1 Reply Latest reply on Nov 9, 2007 9:03 AM by dimival

    Output  of TextField as input for datechooser

    vij010 Level 1

      I have an application here where the user enters the date in DD/MM/YYYY format and this should trigger the date chooser to display the date correctly, how to do this ? is there a method for setdate(), i know there is a selected date....but I want the output of the textfield as the input to the datechooser....
        • 1. Re: Output  of TextField as input for datechooser
          I am bit confused by your question but if i got it correctly you want to convert the text of a TextField into a Date in order to set the selectedDate in a DateChooser control, is that right?

          If it is, then you can do the following:

          Use the parse static method of the Date class, which receives a String as a parameter and returns the number of milliseconds for that date, you can pass this number to the Date class constructor as its unique parameter to obtain a Date object, then you only need to set the selectedDate in the DateChooser control.

          Hope this helps you out