Announcement

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

    Enhancement: Limit clickable Daterange for DateChooser (also as AutoChild)

    Hello Isomorphic,

    I saw that you have DateItem.setStartDate() / setEndDate() with its doc'd restrictions.
    Obviously this works only for setUseTextField(false)-DateItems.
    Besides the fact that one should have a DateRange-Validator defined, the user could be guided a bit in the DateChooser AutoChild.

    Suggestion:
    Could you implement a check inside DateChooser (best: using DateItem.setStartDate() / setEndDate()), that changes the DateChooser so that it is not possible to click-select values outside the given range? Perhaps with an configurable error message defaulting to "Please select a date in the range {startDate} - {endDate}"?
    If you mark the invalid days like you already mark the "not this month"-days (CSS-class "dateChooserDisabledWeekday", "dateChooserDisabledWeekend"), this would also be good.

    This does not prevent the user from entering an unwanted date, but one could use the Validator for that.

    Another enhancement (I currently have no use for it, but perhaps you think it is useful) would be something like
    • DateChooser.setWeekDaysAllowed(boolean)
    • DateChooser.setWeekEndsAllowed(boolean)
    • DateChooser.setDisallowedDays(Date...) (for public holidays)

    Best regards,
    Blama

    #2
    These all makes sense as possible enhancements. If you need to get these features within a particular timeframe or release, use the Feature Sponsorship program.

    Comment


      #3
      Have any of these changes been accomplished by Isomorphic for SmartGwt?

      Comment


        #4
        No, they have no sponsor. If they are important to you, consider sponsoring, perhaps jointly with the original poster.

        Comment


          #5
          Hi all,

          Originally posted by Blama View Post
          Could you implement a check inside DateChooser (best: using DateItem.setStartDate() / setEndDate()), that changes the DateChooser so that it is not possible to click-select values outside the given range? Perhaps with an configurable error message defaulting to "Please select a date in the range {startDate} - {endDate}"?
          If you mark the invalid days like you already mark the "not this month"-days (CSS-class "dateChooserDisabledWeekday", "dateChooserDisabledWeekend"), this would also be good.
          This is the only of the listed feature that would add value in our application currently, but is not needed, as there is no customer demand for it right now.

          Best regards
          Blama

          Comment


            #6
            Hey everyone,

            Has this feature received sponsorship and been implemented? If not, has anyone found a way around it?

            Comment


              #7
              You can set DateChooser.disableWeekends and DateChooser.disabledDates to disable all weekend days or specific dates such as holidays, and if you are creating a DateItem, you can provide these via dateItem.setPickerProperties().

              A feature to cause all dates before the start date and after the end date to appear disabled has not been implemented. There is still no sponsor for this feature, and it's never been mentioned outside of this thread, we so have not yet added it to the roadmap - it's still awaiting sponsorship.

              Comment

              Working...
              X