use
pageLoad()
function
function pageLoad() {
console.log('loaded');
var currentDate = new Date();
$("#txtStartDate, #txtEndDate").datetimepicker(
{
timeFormat: "hh:mm tt",
hourMin: 8,
hourMax: 16,
numberOfMonths: 1,
minDate: 0,
maxDate: 30
});
$("#txtStartDate,#txtEndDate").datepicker("setDate", currentDate);
};