Announcement

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

    Read Only Date Field

    Hi Isomorphic,

    In my application I have defined date fields in ds as follows

    <field>
    <name>estimateDate</name>
    <type>datetime</type>
    <editorType>date</editorType>
    <useTextField>true</useTextField>
    </field>

    I want to force user to enter date through date picker only, by making the text box in front of date as read only.
    Could you please let me know how to achieve this?

    #2
    Probably the best approach is to use a StaticTextItem with a FormItemIcon where you launch the DateChooser yourself.

    Comment


      #3
      Hi Isomorpic,

      Using a staticTextItem will display date like a text, but I want to display date in text box as shown in the attached Date.gif file.

      Please advice
      Attached Files

      Comment


        #4
        Sorry, this requirement isn't making much sense. You want the appearance of a text field which implies the value should be editable, but then you want it to not actually be editable? Are you trying to fool the user? :)

        Comment


          #5
          I want this feature because I don't want that user types in the date in the textbox to avoid mistakes in date format and to avoid adding validations for this.

          Moreover, I am facing issues when date get converted from user local timezone to server timezone when user types in the date instead of choosing it from the calendar.

          Also, it is not a point about fooling the user. The purpose of displaying the text box is to indicate that something needs to be entered here, and the purpose of making it read only is to force the user to chose it from the calender.

          Comment


            #6
            If you like, you can use CSS styling on textBoxStyle to mimic the appearance of an active form item. We would not recommend misleading the user in this way.

            Comment

            Working...
            X