I am using the jQuery dump plugin with this time addon in two input boxes, one for the date "From", and the second with the Date "Date".
When I set the first, I want the second to be one day after the date selected in the first, turning off all dates before the date selected on the From
If the To date is selected first, then the From date is set to the day before the To date.
I found some examples, but I do not know how to get the date over time . So, if I, for example, select 13/12/2010 15:50 on the From date, the date on Date is set to 14/12/2010 15:50 > or at least until 14 /12/ 2010 00:00 .
EDITED ***
I just found this piece of code that works the way I want, but without the timepicker addons.
$(function(){ $('#dateFrom').datepicker({ dateFormat: 'dd/mm/yy', onSelect: function(dateText, inst) { $('#dateTo').datepicker('option','minDate', new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay)); } }); $('#dateTo').datepicker({ dateFormat: 'dd/mm/yy', onSelect: function(dateText, inst) { $('#dateFrom').datepicker('option','maxDate', new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay)); } }); });
Based on the above code, is it possible to adapt it so that I can use it with the timepicker addon?
thanks in advance
jquery jquery-ui-datepicker
eddy
source share