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

Customize Date Field in Custom Editor

3 Answers 60 Views
DataFilter
This is a migrated thread and some comments may be shown as answers.
Shankar
Top achievements
Rank 1
Shankar asked on 22 Aug 2012, 04:11 AM
If an attribute is of type DateTime, the default control on the right side is a Date Picker, however when I try to get the filtered expression, I get in this format: '8/21/2012 11:10:00 PM'

Is there a way we can customize this in the following (or any other format?): 21-AUG-2012 (I also don't need the time attribute)

Please let me know.

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 22 Aug 2012, 06:10 AM
Hello,

Have you tried to format this DateTime with standard string.Format() methods for DateTime?

Greetings,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Shankar
Top achievements
Rank 1
answered on 22 Aug 2012, 03:01 PM
Hello Vlad,

Yes, we can use that for converting date into a valid format, however this happens only when we try to get the filtered expression.

What I really want is that once a date is picked, the picked value is being displayed in a text field. This value should appear in the format I want to see. Is there a possibility for this to happen out of the box?
0
Dimitrina
Telerik team
answered on 24 Aug 2012, 08:04 AM
Hi,

I am not sure what this text field is. Basically when you set the value to it, you can still format the value using string.Format(). If you bind the value, then you can apply formatting for the binding. 

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DataFilter
Asked by
Shankar
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Shankar
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or