Yes, but having worked on the date picker at Airbnb I can assure you almost every custom implementation (probably ours too!) messes up date picking in some region in an important way
Just let me type the date in the user's local format and put in the dashes/slashes with a regex (and remove them again before applying insert/Backspace/Delete). Almost always this is so messed up and broken. And slow.
Sigh. You anonymous code authors are always working to bring the user down, even when there is a 1000000:1 ratio between them and you.