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

[Solved] Datetime Convertion issue

0 Answers 13 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Carlos
Top achievements
Rank 1
Carlos asked on 23 Feb 2012, 05:50 PM
hi all,

Here is my problem.
 
i´m in portugal (i think this information is useful)

i have the asp.net MVC calendar set up using the code in the demo in a mvc 3 with razor app.

the component is treating the dates in format MM/DD/YYYY and i can´t seem to change this behaviour.

for example 03-02-2012 will set the calendar in [2 march 2012] and i want [3  february 2012]. But the query string is set correctly like http://localhost:30938/calendar/selectaction?date=03-02-2012 00:00:00. 

Because of this a date like 02-02-2012 will go back to the controller, but a date like 24-02-2012 will go NULL to the controller because there is no such month 24 and the conversion will fail.

How can i resolve this?

i have Globalization enable

@(
    Html.Telerik().ScriptRegistrar()
                    .DefaultGroup(group => group
                                           .Compress(true)
                                 )
                                 .Globalization(true)
                                  
   )

this is done in such a way that we dont have much more to do.

It´s possible to do some kind of format when setting the anonimous type in 
.Action("SelectAction"new { date = "{0}"}<-- here )






 
Tags
Calendar
Asked by
Carlos
Top achievements
Rank 1
Share this question
or