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

Datepicker Saving Format Issue

3 Answers 230 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Adhip
Top achievements
Rank 1
Adhip asked on 21 Sep 2016, 05:51 AM

Hi,

I am using a date picker to edit the date displayed on my grid.

@(Html.Kendo().DatePicker()
                 .Name("Date")
                 .Value("Value")
                 .Format("MM/dd/yyyy")
                 .HtmlAttributes(new { style = "width: 30%" })
)
The problem is while saving the date it gets saved as shown in the attachment.

I just want it to be saved in the format (mm/dd/yyyy) and I dont want those extra labels such as indian standard time etc.

Can anyone help?

Regards,

Adhip

 

3 Answers, 1 is accepted

Sort by
0
Eduardo Serra
Telerik team
answered on 21 Sep 2016, 08:10 PM
Hello Adhip,

What you're describing is not an issue related to the Kendo UI Datepicker; the format you're seeing is the default string output format for JavaScript Date objects. If you want to save the date as a string with a different format, then feel free to manipulate the date object beforehand.

I hope this helps!

Regards,
Eduardo Serra
Telerik by Progress
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 Feedback Portal and vote to affect the priority of the items
0
Adhip
Top achievements
Rank 1
answered on 22 Sep 2016, 04:43 AM

Hi Eduardo,

Thanks for your reply, I will look into it.

Also what you said can be applied to the Timepicker as well because it is also saving the time in a similar format?

 

Thanks and Regards,

Adhip

0
Eduardo Serra
Telerik team
answered on 22 Sep 2016, 04:49 PM
Hello Adhip,

Yes, it can also be applied to the TimePicker!

Regards,
Eduardo Serra
Telerik by Progress
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 Feedback Portal and vote to affect the priority of the items
Tags
Date/Time Pickers
Asked by
Adhip
Top achievements
Rank 1
Answers by
Eduardo Serra
Telerik team
Adhip
Top achievements
Rank 1
Share this question
or