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

[ DataPicker ] how to show the date in the following format: 'dd/MM/yyyy' ?

3 Answers 120 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
lucas
Top achievements
Rank 1
lucas asked on 08 Sep 2010, 08:07 PM
I wonder if it's possible to format the date in the following format: 'dd/MM/yyyy'

3 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 09 Sep 2010, 12:13 PM
Hi lucas,

You can achieve your goal with setting format property of the datepicker UI component on client:
function onLoad(e) {
    $(this).data('tDatePicker').format = 'dd/MM/yyyy';
}

As you probably noticed, you need to wire OnLoad event of the component and call the above event handler.

Please note that datepicker UI component depends on the Culture, and if you set Value() on the server, where the format is 'M/d/yy', the initially rendered will be formatted with it.

Sincerely yours,
Georgi Krustev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
lucas
Top achievements
Rank 1
answered on 09 Sep 2010, 07:19 PM
This is exactly what I nedded.
Thank you very much!
0
Uday
Top achievements
Rank 1
answered on 21 Mar 2012, 01:27 PM
Is there way to format what is shown in the popup calendar that shows up when you click the calendar icon?  I just want it to show the years instead of full monthly calendars.

Thanks,

Uday
Tags
General Discussions
Asked by
lucas
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
lucas
Top achievements
Rank 1
Uday
Top achievements
Rank 1
Share this question
or