Announcement

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

    disable dates in listgrid daterange

    Hello,

    I am looking for a way to disable a specified range of dates for the daterange filter of a listgrid. For example, I would like to disable all dates earlier than five days ago. Ideally I would like for those dates to be grayed out in the selection calendar that pops up when the user is setting the filter (see attached image).

    I am using smartgwtpower-2.5
    Attached Files

    #2
    The DateChooser pop-up doesn't currently have the ability to grey out dates, so the best way to handle this is currently just to validate somewhere downstream (perhaps when criteria are submitted) and show an error message.

    Comment


      #3
      We cannot determine where to add the validation. We have something like this for a date selector that is outside of a ListGrid, but we have not seen how to do this for one that is inside a ListGrid filter editor.

      Any help would be greatly appreciated.

      Comment


        #4
        The best way to do this is to simply return a global error (status -1) on a fetch with criteria that are not valid. By default this will result in a dialog shown to the user, and they will be able to adjust the criteria and proceed.

        If you'd like to be able to just set a property on the date range control to limit it to certain dates, that would be a valid Feature Sponsorship.

        Comment


          #5
          Thank you for the response.

          Is there any way to add a validator to the values typed into the filter editor like you can, for example, for a date selection control outside of the ListGrid?

          Comment


            #6
            No, there's not currently a way to do this - there is no validation flow for items used to enter criteria, nor a validator that takes a Criteria.

            Comment

            Working...
            X