for example in that textbox im using format like this dd-MMM-yyyy example 01-Oct-2020 if user anything apart from this i want to show date format is not correct without postback..
ASP.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
Member
309 Points
716 Posts
check textbox dateformat in javascript without postback
Oct 07, 2020 04:57 PM|Gopi.MCA|LINK
Hello
In aspx page i have one textbox1
for example in that textbox im using format like this dd-MMM-yyyy example 01-Oct-2020 if user anything apart from this i want to show date format is not correct without postback..
how to do so
Thanking you
Contributor
2400 Points
752 Posts
Re: check textbox dateformat in javascript without postback
Oct 08, 2020 08:40 AM|XuDong Peng|LINK
Hi Gopi.MCA,
According to your description, I think you could try to use Moment.js to verify the date format of the value in the text box.
A simple example:
Result:
Hope this can help you.
Best regards,
Xudong Peng