简体   繁体   English

实时jQuery datepicker不显示

[英]Live jQuery datepicker not showing

There is a problem with the way I am using the datepicker, it is creating an empty div therefore is not visible when focussing on the text box. 我使用datepicker的方式存在问题,它正在创建一个空的div,因此当将焦点放在文本框中时不可见。

 $( document ).ready(function() {
     /*url of booking page on site*/
     var url = "aurl";

     /*max number of nights in dropdown*/
     var maxNights = 20;

     /*max number of adults in dropdown*/
     var maxAdults = 10;

     var bookingfeed = new DSMHotels(url, maxNights, maxAdults);
     bookingfeed.create();

     jQuery( "#ArrivalDate" ).datepicker({ dateFormat: "dd-mm-yy" });
 });

http://jsfiddle.net/jTyWP/4/ http://jsfiddle.net/jTyWP/4/

Thanks 谢谢

Alex 亚历克斯

It seems like the input#ArrivalDate has the hasDatepicker class applied on to it. 似乎input#ArrivalDate已应用hasDatepicker类。 Remove it and datepicker will work. 删除它,日期选择器将起作用。

Demo 演示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM