Reputation: 850
Here issue is while enter the date in datertimepicker manually has to display the meesage that "enter in date format" how to check the that is in programmatically.
code:
function getFormattedDate(date) {
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear().toString().slice(2);
return day + '-' + month + '-' + year;
}
Upvotes: 1
Views: 627
Reputation: 88
Why don't you make your input for both the datatimepicker readonly that way user have to select date from datatimepicker.
Upvotes: 3