LCJ
LCJ

Reputation: 22652

Is there a better way or ajax control (for Calendar)

I need a calendar to be displayed on a textbox.

This can be achieved using ajaxToolkit: Calendar control.

I can use FilteredTextBoxExtender to ensure that it enters only valid characters.

Also I can use jQuery to ensure that the dates are valid dates only (13/13/20123 is an invalid date).

But is there a better way or ajax control (in the toolkit) for it?

Note: I am looking for a solution using ajax control toolkit. For my project, jQuery-UI is not allowed.

<ajaxToolkit:Calendar runat="server"
TargetControlID="Date1"
CssClass="ClassName"
Format="MMMM d, yyyy"
PopupButtonID="Image1" />


<ajaxToolkit:FilteredTextBoxExtender ID="ftbe" runat="server"
TargetControlID="txtDate"         
FilterType="Custom, Numbers"
ValidChars="1234567890/" />

REFERENCE:

  1. http://forums.asp.net/p/1825929/5076051.aspx/1?Re+How+to+disable+future+dates+in+ajax+calendar+extender+

Upvotes: 0

Views: 573

Answers (1)

Kapil Khandelwal
Kapil Khandelwal

Reputation: 16144

Try Using jQuery UI Datepicker:

<script>
    $(function() {
        $( "#datepicker" ).datepicker();
    });
</script>

<div class="demo">
   <p>Date: <input id="datepicker" type="text"></p>
</div>

jQuery UI Datepicker

Upvotes: 1

Related Questions