Does anyone know about free date and * time * ASP.NET User Control

Every time I have to create a form with a field DateTime

, I try to find a decent free custom control - I always fail.

I can't figure out why it's not built in .NET, but let's forget for a moment and focus on my question: D

Anyone got it?

0


source to share


7 replies


Use two separate text boxes, one for the date and one for the time. For date one, use the ASP.NET Ajax Control Toolkit Calendar control as another person pointed out.

Over the course of the TextBox time, view the MaskedEditExtender control in the same toolbox. You can set it up to show :: __ AM / PM and let the user fill in. You can fill with zeros if they just type "3p" and exit the table.

To use it, you need a TextBox. You set the MaskedEditExtender TargetControlID to the TextBox ID. Here are some of the attributes you need to set on the MaskedEditExtender tag to record the time:



Mask="99:99"
AutoCompleteValue="00:00"
AcceptAMPM="true"
MaskType="Time"

      

Also, if you get a strange FindControl related error, make sure your MaskedEditExtenders have IDs all.

+1


source


Just put the two together

http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/



http://keith-wood.name/timeEntry.html

jQuery is where it's at!

+2


source


Check out the calendar extension with MS AJAX Control Toolkit , I really like it.

+1


source


I just did a quick google and came across this ...

http://www.softcomplex.com/products/tigra_calendar/demo1.html

It looks like it supports dates and times, and it seems like it is free.

0


source


I got lucky with this:

http://www.eworldui.net/

0


source


It works really well.

<asp:TextBox runat="server" ID="startDate" autocomplete="off" />
<ajaxToolkit:CalendarExtender 
    ID="defaultCalendarExtender" 
    runat="server" 
    TargetControlID="startDate" />
<asp:TextBox ID="startTime" runat="server" Columns="8"></asp:TextBox>
<ajaxToolkit:MaskedEditExtender 
    ID="startTime_MaskedEditExtender1" runat="server" 
    Enabled="True" 
    TargetControlID="startTime" 
    MaskType="Time" 
    AutoCompleteValue="09:00"
    Mask="99:99"
    AcceptAMPM="true">
</ajaxToolkit:MaskedEditExtender>
<ajaxToolkit:MaskedEditValidator 
    ID="MaskedEditValidator1" 
    runat="server" 
    ControlExtender="startTime_MaskedEditExtender1"
    ControlToValidate="startTime" 
    IsValidEmpty="False"
    EmptyValueMessage="Time is required"
    InvalidValueMessage="Time is invalid"
    Display="Dynamic"
    TooltipMessage="Input a time"
    EmptyValueBlurredText="*"
    InvalidValueBlurredMessage="Check time">

      

0


source


Ra-Ajax Calendar Control will be released this coming Friday (November 28, 2008) with time support (two text fields between Today button and date)

Ra-Ajax is LGPL licensed and free of charge for use ...

0


source







All Articles