Skip to content

abidhkm/date-input-validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Date validation based on locale

Date formats:

EN-GB --> DD/MM/YYYY

EN-US --> MM/DD/YYYY

JA (japanese) --> YYYY/MM/DD

So, 22/11/2022 is a valid date in EN-GB but not for EN-US and JA.

Therefore date input field validation is important based on the locale selection for better user experience.

This repo showing an example on how this can be done using moment.js

Please refer this file for example code (in react)

About

Example code for date input validation based on locale

Resources

Stars

Watchers

Forks