This is a migrated thread and some comments may be shown as answers.

Need to Stop DatePicker autocorrect

0 Answers 75 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Werner
Top achievements
Rank 1
Werner asked on 30 Nov 2017, 11:08 AM

Hi,

I have been struggling with this a fair bit.

I have a Telerik Raddatepicker control in a custom usercontrol. When a user Enters a date of 31/02/2000 (Invalid, as there never is 31 days in February), I need to display an error or, show the yellow triangle or something, instead of the control changing the date to 28/02/2000. The control must NOT automatically change the date.
I cannot use one of the latest versions of Telerik.Web.UI.Dll that has the EnableSmartParsing property.

I am bound to use version: 2013.2.717.40.

Please assist me with a script to accomplish this.

What I currently have is :

<script type="text/javascript">
Telerik.Web.UI.RadDateInput.prototype.parseDate = function (value, baseDate) {
{
if (new Date(value) != "NaN")
return new Date(value);
this.set_textBoxValue(value);

}

</script>

No answers yet. Maybe you can help?

Tags
DatePicker
Asked by
Werner
Top achievements
Rank 1
Share this question
or