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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sindhu
    New Member
    • Oct 2006
    • 53

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

    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
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Why not just use three select elements where they can select the date, month and year?

    Comment

    • sindhu
      New Member
      • Oct 2006
      • 53

      #3
      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

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Yes, that is an alternative, but select elements mean less hassle with validating input. Anyway, glad to hear that you solved it yourself.

        Comment

        Working...