This question is locked. New answers and comments are not allowed.
Here is the line of code :
It's straight forward and it display correctly the case of if the date is set or if it's minimum to display the current date.
The problem is when we call with Ajax this function and try to set the content of this view into the Telerik window. The code is exactly the same, but since the user did a mistake in the form (somewhere else) we do not close the window but simply go get the view and display it back. I think it's pretty standard and I if I use break point to this line everything is fine with the Value(.....) I see a real date. But in the display, the format is not respected.
Two things you have to know:
1) I always have when I debug with VS the exception File not found on the calendar control "Specified file does not exist: "~/Scripts/jquery-1.7.1.js"." At first I thought that it wasn't a problem since it load correctly the first time (even with this error at the first time also).
2) The format is not good I receive in fact : "2012-04-05T04:00:00.000Z" which is the good date but not formatted.
Why does the formatting work only the first time and not on rexecuting the call on Ajax?
@Html.Telerik().DatePickerFor(model => model.Date).Min(DateTime.Today).Value(Model.Date > DateTime.MinValue ? Model.Date : DateTime.Today).Format("D")It's straight forward and it display correctly the case of if the date is set or if it's minimum to display the current date.
The problem is when we call with Ajax this function and try to set the content of this view into the Telerik window. The code is exactly the same, but since the user did a mistake in the form (somewhere else) we do not close the window but simply go get the view and display it back. I think it's pretty standard and I if I use break point to this line everything is fine with the Value(.....) I see a real date. But in the display, the format is not respected.
Two things you have to know:
1) I always have when I debug with VS the exception File not found on the calendar control "Specified file does not exist: "~/Scripts/jquery-1.7.1.js"." At first I thought that it wasn't a problem since it load correctly the first time (even with this error at the first time also).
2) The format is not good I receive in fact : "2012-04-05T04:00:00.000Z" which is the good date but not formatted.
Why does the formatting work only the first time and not on rexecuting the call on Ajax?