我使用this incredibly awesome jquery mobile oriented datepicker,我想根据设备尺寸定制。我看到了一些建议,指向修改CSS
,但我无法捕捉创建日历出现的弹出对话框的事件。自定义jtsage datebox为jQuery Mobile的
是否有jsfiddle
,我可以看看和学习的地方?
我使用this incredibly awesome jquery mobile oriented datepicker,我想根据设备尺寸定制。我看到了一些建议,指向修改CSS
,但我无法捕捉创建日历出现的弹出对话框的事件。自定义jtsage datebox为jQuery Mobile的
是否有jsfiddle
,我可以看看和学习的地方?
看着你提供的页面上的例子,它似乎被绑定到vmouseclick事件。所以,你应该能够使用click
,vmousedown
,vmouseup
根据您的需要。
所以,如果你有HTML这样的:
<label for="mydate">Some Date</label>
<input name="mydate" id="mydate" type="date" data-role="datebox" data-options='{"mode": "datebox"}'>
你JQM会是这样:
$("mydate").click(function(){
// Do something
});
我没有看到CONFIGS的任何选项在打开调整DateBox的大小。所以,你想创建时检查DIV
的CSS和类设置,然后加上自己的CSS覆盖他们所使用的CSS(<link rel="stylesheet" type="text/css" href="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.min.css" />
),或下载CSS并对其进行编辑。
没有默认的jsfiddle这一点,但我感动的例子为一个供您使用,如果你喜欢玩:http://jsfiddle.net/Twisty/pNQeD/