I am try to implementing datepicker using jquery ,I want set max date of second datepicker is to selected date of first datepicker.
here is my code :-
$('#firstDatePiker').datetimepicker({
dayOfWeekStart : 1,
lang:'en',
startDate:""+currentdate,
minDate: 0
});
$('#proofingDate').datetimepicker({
dayOfWeekStart : 1,
lang:'en',
startDate:""+currentdate,
minDate: 0,
});
I have call function onblur
event on first datepiker as follows:-
function addmaxDate()
{
var proDatetemp=$('#runDate').val();
var maxDate = new Date(proDatetemp );
$( "#proofingDate" ).datetimepicker( "option", "maxDate", maxDate );
}
You can use
onShow
method ofdatetimepicker