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
1 Answer
Reset to default 4Is 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条)