user123
user123

Reputation: 850

Check date format in DateTimePicker?

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.

My fiddle.

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

Answers (1)

Rohit
Rohit

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

Related Questions