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

DatePicker initialized with a french date format

1 Answer 131 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
nachid
Top achievements
Rank 1
nachid asked on 24 Jun 2012, 03:18 PM
Here is the scenario
A french environment with globalization set to "FR-fr"
I included the french kendo culture script and added the call to kendo.culture( 'FR-fr')

I have an input field that contains a datetime in a french format
<input id="EventDate" type="text" value="24/08/2012"  name="EventDate" >

I tried to transform this input field to a kendo datepicker but failed to have the correct date value
I tried so many combinations from
$("#EventDate").kendoDatePicker({format: "D"})
to
$("#EventDate").kendoDatePicker({
           format: "D",
           value: new Date($("#EventDateEnd").val())
  });


The new kendo datepicker correctly displayed but never picked up the correct date value : Friday, August 24, 2012

1 Answer, 1 is accepted

Sort by
0
nachid
Top achievements
Rank 1
answered on 24 Jun 2012, 03:42 PM
when I remove the format and keep it very simple, it works.
$("#EventDate").kendoDatePicker();
Reading the documentation again, it looks the format is only used to parse value set with value() method
I was used to use it as a display template.
I'm wondering how to change the display  format then
from my initial
<input id="EventDate" type="text" value="24/08/2012 "  name="EventDate" >
I want to get a datepicker that displays vendredi 24 aout 2012

I should then change the title of this thread and say how to change the display format for a datepicker widget
Tags
Date/Time Pickers
Asked by
nachid
Top achievements
Rank 1
Answers by
nachid
Top achievements
Rank 1
Share this question
or