Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to force user to select date from date chooser

    Hi Isomorphic,

    Please let me know, how to force user to select date from date chooser, Below is the DataSource field definition:

    <field>
    <name>date</name>
    <type>datetime</type>
    <editorType>date</editorType>
    <hidden>false</hidden>
    <required>true</required>
    <title>Estimate Date</title>
    <prompt>Date</prompt>
    <useTextField>true</useTextField>
    </field>

    #2
    Setting required will do it, just make sure you are running validation (automatic as part of saveData(), or manual via validate()) and have not provided a defaultValue for the field (which will pass required validation).

    Comment


      #3
      We are using same Data source to update form and search. For search we are using FilterBuilder. In search pouup, we wanted to restrict user to select value from Date chooser but in form user can enter the values.

      Comment


        #4
        If you need to customize something for the FilterBuilder as compared to other forms, create a DataSource that uses DataSource.inheritsFrom to inherit fields from the main DataSource. Use this with the FilterBuilder after re-defining any fields you want to change, eg, in this case, you could use a different editorType that is based on DateItem but sets useTextField:false.

        Comment

        Working...
        X