最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Disable auto scroll on JQuery datetime plugin - Stack Overflow

programmeradmin3浏览0评论

I am using a JQuery datetime plugin in my application. When I scroll down or up my page and if my mouse pointer es across date field text boxes then it changes dates because of scrolling. Even if date is not entered in date field then also it scrolls up or down from the current date. How to disable the scrolling on these date fields. You can see this behavior in the official page of this plugin for DatePicker field here: /

I am using a JQuery datetime plugin in my application. When I scroll down or up my page and if my mouse pointer es across date field text boxes then it changes dates because of scrolling. Even if date is not entered in date field then also it scrolls up or down from the current date. How to disable the scrolling on these date fields. You can see this behavior in the official page of this plugin for DatePicker field here: http://xdsoft/jqplugins/datetimepicker/

Share Improve this question asked May 20, 2016 at 18:07 user1614862user1614862 4,1497 gold badges33 silver badges49 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 12

Pass options scrollMonth and scrollInput to false.

$('.myDatePicker').datetimepicker({
    timepicker : false,
    closeOnDateSelect : true,
    format : 'd-m-Y',
    scrollMonth : false,
    scrollInput : false
});

set scrollMonth to false

jQuery('#datetimepicker4').datetimepicker({
  format:'d.m.Y H:i',
  lang:'ru',
  scrollMonth : false
});
发布评论

评论列表(0)

  1. 暂无评论