jQuery datetime picker with date restrictions
We need a datetime picker that should be configurable to restrict the choice of certain dates (in the past, for example). Optionally it should restrict hours in the past.
Note that we've tried a lot of datetime picker components but they开发者_如何学编程 didn't have the restriction option. Note also that this plugin has minDate
, but it does not support time picking.
Also, it should be fairly new - i.e. working on 1.4.2.
take a look at Zebra_Datepicker, a highly configurable datepicker jQuery plugin which offers a very intuitive mechanism for disabling dates and date ranges using a syntax similar to cron‘s syntax, and also makes it easy to make past-only or future-only date pickers.
// future-only, starting tomorrow
$('#datepicker').Zebra_DatePicker({
direction: 1
});
// past-only, ending today
$('#datepicker').Zebra_DatePicker({
direction: false
});
// future only starting today
// weekends are disabled
$('#datepicker').Zebra_DatePicker({
direction: true,
disabled_dates: ['* * * 0,6']
});
check this out: http://code.google.com/p/jquery-dtpicker/
if you combine the time field with up/down arrows there with the jQuery UI datepicker, it might just do the thing for you
精彩评论