Monday, January 14, 2013

Calendar Mask and AJAX


<asp:TextBox ID="txt_prov_srvc_from_dt" runat="server" MaxLength="10" />
                    <asp:ImageButton ID="ibtnServFromDtCal" AlternateText="Calendar" ImageUrl="~/images/calendar_icon_blue.gif" runat="server" CausesValidation="false" />
                                    <ajaxtoolkit:MaskedEditExtender ID="maskExtenderServFromDtCal" TargetControlID="txt_prov_srvc_from_dt" MaskType="None" Mask="99/99/9999" ClearMaskOnLostFocus="False" runat="server" />
                                    <ajaxtoolkit:CalendarExtender ID="maskCalExtenderServFromDtCal" TargetControlID="txt_prov_srvc_from_dt" PopupButtonID="ibtnServFromDtCal" Format="MM/dd/yyyy" runat="server" />
                    <asp:CompareValidator ID="ProvSrvcFromDtValidator" runat="server" ErrorMessage="CompareValidator" Type="Date" ControlToValidate="txt_prov_srvc_from_dt" Operator="DataTypeCheck" Display="Dynamic" Font-Bold="True">?</asp:CompareValidator>
                    <asp:TextBox ID="txt_prov_srvc_to_dt" runat="server" MaxLength="10" />
                    <asp:ImageButton ID="ibtnServToDtCal" AlternateText="Calendar" ImageUrl="~/images/calendar_icon_blue.gif" runat="server" CausesValidation="false" />
                                    <ajaxtoolkit:MaskedEditExtender ID="maskExtenderServToDtCal" TargetControlID="txt_prov_srvc_to_dt" MaskType="None" Mask="99/99/9999" ClearMaskOnLostFocus="False" runat="server" />
                                    <ajaxtoolkit:CalendarExtender ID="maskCalExtenderServToDtCal" TargetControlID="txt_prov_srvc_to_dt" PopupButtonID="ibtnServToDtCal" Format="MM/dd/yyyy" runat="server" />
                    <asp:CompareValidator ID="ProvSrvcToDtValidator" runat="server" ErrorMessage="CompareValidator" Type="Date" ControlToValidate="txt_prov_srvc_to_dt" Operator="DataTypeCheck" Display="Dynamic" Font-Bold="True">?</asp:CompareValidator>
Post a Comment