Link to home
Start Free TrialLog in
Avatar of SenaAK
SenaAK

asked on

telerik RadDateTimePicker Culture formant (MM/DD/YY HHMM) ?

<telerik:DataFormDataField Label="Occurred:"
                                              DataMemberBinding="{Binding TimeOccurred, Mode=TwoWay}"
                                              LabelPosition="Above">
<telerik:RadDateTimePicker SelectedValue="{Binding TimeOccurred, Mode=TwoWay}"
                                              DateTimeWatermarkContent="Enter date and time"
                                              TimeInterval="0:30:0" Culture="en-GB"/>

en-GB gives me DD/MM/YYYY HH:MM is there one that gives me MM/DD/YY HH:MM or MM/DD/YYYY HH:MM
Avatar of developmentguru
developmentguru
Flag of United States of America image

You notice that the format you are trying to use is attempting to use MM for month as well as for minutes?

The controls I am used to working with would format it this way:
MM/DD/YYYY HH:NN

If the control allows formatting then how you format it should work if you want to switch days and months, but I have yet to see one that will try to distinguish months from minutes based on the position within the mask.  Let me know if you need more.
Avatar of SenaAK
SenaAK

ASKER

Adding the <<\/dd]\yy HHmm String format helped on displaying the datetime but when I use the DateTimpPicker the Culture='en-GB' is still in DD/MM/YYYY HH:MM  - I would like them both to display with the military datetime format --- are the Cultures documented anywhere?

<telerik:DataFormDataField Label="Occurred:"
                                              DataMemberBinding="{Binding TimeOccurred, Mode=TwoWay, StringFormat='MM\/dd\/yy HHmm'}"
                                              LabelPosition="Above">
<telerik:RadDateTimePicker SelectedValue="{Binding TimeOccurred, Mode=TwoWay}"
                                              DateTimeWatermarkContent="Enter date and time"
                                              TimeInterval="0:30:0" Culture="en-GB"/>
ASKER CERTIFIED SOLUTION
Avatar of developmentguru
developmentguru
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SenaAK

ASKER

Did not directly answer the telerik culture formatting issue.