jquery - DateTimePicker onchage State -


i have 2 datetimepicker on application called start date & due date. if user selects 7th april start date end date should not less 7th, before 7th april dates should disable. since datetimeepicker both date & time should taken consideration.

$('.tsk_start').datetimepicker({   format: 'yyyy-mm-dd hh:ii',   //daysofweekdisabled:[5,6],   autoclose: true,   todaybtn: true,   startdate: new date(), }).on('changedate', function(selected){             });  $('.tsk_end').datetimepicker({   format: 'yyyy-mm-dd hh:ii',   autoclose: true,   todaybtn: true, }).on('changedate', function(selected){  }); 

i searched multiple questions here unable find proper documentation. using plugin http://www.malot.fr/bootstrap-datetimepicker/index.php

as state you're using this plugin, allows set start date of picker when option chosen, this:

$('.tsk_start').datetimepicker({   format: 'yyyy-mm-dd hh:ii',   autoclose: true,   todaybtn: true,   startdate: new date(), }).on('changedate', function(selected){              $('.tsk_end').datetimepicker('setstartdate', selected.date.valueof()); });  $('.tsk_end').datetimepicker({   format: 'yyyy-mm-dd hh:ii',   autoclose: true,   todaybtn: true, }) 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -