if(!checkDate(document.getElementById("txtUPCDate").value) ) { alert ( "Invalid Date" ); document.getElementById("txtUPCDate").value=""; setTimeout(function(){document.getElementById('txtUPCDate').focus()}, 5); return false; }
<asp:TextBox ID="txtUPCDate" runat="server" Text="DD/MM/YYYY" TabIndex="16" MaxLength="10" onchange="return UPCDateCheck();"></asp:TextBox> <ajaxToolkit:TextBoxWatermarkExtender ID=" TextBoxWatermarkExtender6" TargetControlID="txtUPCDate" WatermarkText="DD/MM/YYYY" runat="server"> </ajaxToolkit:TextBoxWatermarkExtender> <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender7" runat="server" CultureName="en-GB" InputDirection="LeftToRight" Mask="99/99/9999" MaskType="Date" TargetControlID="txtUPCDate"> </ajaxToolkit:MaskedEditExtender>
setTimeout(function(){document.getElementById('txtUPCDate').focus()}, 5);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)