2 Replies Latest reply on Mar 6, 2014 12:35 PM by try67

    dynamic date/time format changing

    MatLac Level 3

      How can I set a Date/Time format of a textbox to behave like a phone number format, where the user only enters numbers, but it displays some other way of my choosing.


      // get new Date object
      var a = event.target.value;

      var oDate = util.scand("yyyymmdd", a);

      // format to yyyy/mm/dd
      var xDate = util.printd("yyyy/mm/dd", oDate);

      event.target.value = xDate;


      This doesn't work.