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

Problem with validation and culture

2 Answers 48 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 1
Luis asked on 29 Jun 2009, 01:42 PM
Hello,

this is my control code:

<telerik:raddatepicker ID="RadDatePicker1" Style="display" MinDate="2009-01-01" runat="server"
          Width="110px" Culture="es-ES" Calendar-CultureInfo="Spanish (Spain)" DateInput-Culture="es-ES" DateInput-DateFormat="dd/MM/yyyy" DateInput-DisplayDateFormat="dd/MM/yyyy">
          <Calendar ID="Calendar1" runat="server" CultureInfo="Spanish (Spain)" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x"
            TitleStyle-CssClass="CalendarioBarraTitulo" FastNavigationStyle-CssClass="CalendarioBarraTitulo" CalendarTableStyle-VerticalAlign="NotSet"
            EnableViewState="False">
          </Calendar>
          <DateInput ID="DateInput1" runat="server" Culture="es-ES"  ReadOnly="False" DateFormat="dd/MM/yyyy" DisplayDateFormat="dd/MM/yyyy">
          </DateInput>
        </telerik:raddatepicker>

I have defined a culture and i want the control not to validate a date format that is correct in other culture but not in mine. For example, the format "MM/dd/yyyy" is wrong for my culture, so "21/12/2009" is a correct date and "12/21/2009" should not. But if I type "12/21/2009", the control accepts that date and changes it to "21/12/2009".

Is there a way to solve this problem?

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 02 Jul 2009, 09:12 AM
Hello Luis,

Unfortunately the behavior you are trying to achieve is not possible. The RadDateInput will always format the date depending on the culture settings.

Regards,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Luis
Top achievements
Rank 1
answered on 02 Jul 2009, 09:38 AM
Thank you very much.
Tags
Calendar
Asked by
Luis
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Luis
Top achievements
Rank 1
Share this question
or