angularjs - Set today's date as default date when page load in jQuery UI datepicker -


i trying display today's date default value in text box. have tried below code. not working

start date : <input tgdatepicker ng-model="searchmodel.starttime" id ="starttime" /> end date   : <input tgdatepicker ng-model="searchmodel.endtime" id ="endtime" /> 
$("#starttime").datepicker({      dateformat: "mm-dd-yy" }).datepicker("setdate", new date()); 

you can set default date using : defaultdate: new date(1985, 00, 01)

$("#starttime").datepicker({      dateformat: "mm-dd-yy",     defaultdate: new date(2015, 07, 01) }) 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -