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
Post a Comment