|
Rank: Member Groups: Member
Joined: 5/20/2008 Posts: 12
|
I am using the following code and I would like the entry 1_:1_ AM to automatically fill with leading zeros 01:01 AM
I have now found a way to accomplish this.
<eo:MaskedEdit runat="server" id="time_part" IsValid="True" style="width:70px"> <eo:MaskedEditSegment IsRequired="True" MaxValue="23" SegmentType="Number"></eo:MaskedEditSegment> <eo:MaskedEditSegment Text=":" IsRequired="True"></eo:MaskedEditSegment> <eo:MaskedEditSegment IsRequired="True" MaxValue="59" SegmentType="Number"></eo:MaskedEditSegment> <eo:MaskedEditSegment Text=" " IsRequired="True"></eo:MaskedEditSegment> <eo:MaskedEditSegment IsRequired="True" Choices="AM|PM" SegmentType="Choice"></eo:MaskedEditSegment>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Hi,
Thanks for sharing. I believe you can also use DatePicker for that. You would need to:
1. Set the DatePicker's PickerFormat to "hh:ss tt"; 2. Set the DatePicker's PopupImageUrl, PopupHoverImageUrl and PopupDownImageUrl to "Blank" so that no visible images are displayed because you do not need a drop down for the time picker;
Thanks
|
|
Rank: Member Groups: Member
Joined: 5/20/2008 Posts: 12
|
I have problems only setting the SelectedDate value when only display te hh:mm tt
<eo:DatePicker id="DatePicker1" runat="server" PickerFormat="hh:mm tt" PopupImageVisible="False">
DatePicker1.SelectedDate = Now
After this line of code the value = " : AM"
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Please check your version. This was not there at the very beginning. However the latest version should work fine.
|
|