By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,146 Members | 1,816 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,146 IT Pros & Developers. It's quick & easy.

dd/mm/yy,mm/dd/yy,yy/mm/dd

P: 54
Hello,

i've a requirement where i want to change the entered date format based on the selection of whether mm/dd/yy , dd/mm/yy or yy/mm/dd

Please give me some idea on how to do this using javascript

thanks alot
Feb 14 '08 #1
Share this Question
Share on Google+
3 Replies


acoder
Expert Mod 15k+
P: 16,027
Why not just use three select elements where they can select the date, month and year?
Feb 14 '08 #2

P: 54
Thanks for suggestion. but that is not according to the requirement.
I got the solution. i tried to fetch the date. and stored it in dd,mm and yy variables dor date, month and year. and depending on dd/mm/yyyy or mm/dd/yyyy i positioned them accordingly.
Thanks alot
Feb 15 '08 #3

acoder
Expert Mod 15k+
P: 16,027
Yes, that is an alternative, but select elements mean less hassle with validating input. Anyway, glad to hear that you solved it yourself.
Feb 15 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.