calendar - How to disable dates after current date in javascript calender - Stack Overflow

I want to disable the dates after the current date in my program.I have a date picker written in JavaSc

I want to disable the dates after the current date in my program.

I have a date picker written in JavaScript.

My JavaScript code:

Click here to view my JavaScript code. Please help me in making necessary changes so as to disable the future date, i.e dates up to current date are only to be displayed.

I want to disable the dates after the current date in my program.

I have a date picker written in JavaScript.

My JavaScript code:

Click here to view my JavaScript code. Please help me in making necessary changes so as to disable the future date, i.e dates up to current date are only to be displayed.

Share Improve this question edited Jan 22, 2012 at 20:38 Matthew 8,44610 gold badges39 silver badges67 bronze badges asked Jan 22, 2012 at 18:36 Chetan Sandeep RenuChetan Sandeep Renu 1734 silver badges10 bronze badges 1
  • 1 Please post the relevant sections of code here so that they can be documented with the question. – nachito Commented Jan 22, 2012 at 18:39
Add a ment  | 

1 Answer 1

Reset to default 4

Is it too late to switch to jQuery and jQuery UI? The jQuery UI Datepicker provides this functionality easily:

$(function() {
   $('#datepicker').datepicker({ maxDate: 0 });
});

http://jqueryui./demos/datepicker/#min-max

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744845978a4596838.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信