Welcome Guest Search | Active Topics | Sign In | Register

Leading Zeros in Masked Input Options
aspnet_vb
Posted: Monday, July 7, 2008 12:27:35 PM

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>
eo_support
Posted: Monday, July 7, 2008 12:44:45 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
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
aspnet_vb
Posted: Monday, July 7, 2008 3:08:46 PM

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"
eo_support
Posted: Monday, July 7, 2008 4:04:23 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Please check your version. This was not there at the very beginning. However the latest version should work fine.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.