knockout.js - how to bind kendo datetime picker with knockout observable element? -


i have observable property should bound kendo datetime picker. proerty has default value. when observable property bound kendo datetime picker, value should shown. on update of date , time through picker observable has updated.

the html code is:

<div class='input-group date' id='datetimepicker1'>    <input class="form-control"  />   </div> 

and script code is:

var vm = {             maintenancedatetime: ko.observable(), };  $("#datetimepicker1").kendodatetimepicker({     timeformat: 'hh:mm',      dateformat: 'yy-mm-dd',      value: vm.maintenancedatetime() }); 

i not able working. can me this.

thanks.

use knockout-kendo (there exist nuget package).

other option create custom binding.


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -