Announcement

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

    Date Range

    Hi Isomorphic,

    I would like to know how I can place the system time in the calendars (MiniDateRangeItem) and in the filters of the DataSourceDateTimeField type fields. Currently, it shows "00:00" in "from" and "23:59" in "to".

    In addition, it is required to hide the "apply" button and have the "today" button perform the function of placing the date value. The current behavior is designed so that the calendar is not closed until "apply" is pressed. This only occurs in calendars with type "dateTime". If it is of type "date", it works correctly according to our needs, but does not include the time (which is important for us).

    Click image for larger version

Name:	DateRange.jpg
Views:	137
Size:	25.7 KB
ID:	270981

    #2
    We're not sure what you mean by "the system time". but if you mean that you want to populate the MiniDateRangeItem with some initial criteria, you just apply those criteria to the grid. The Grid Filtering Overview will help you understand the different types of criteria that can be applied:

    https://smartclient.com/smartgwt-lat...Filtering.html

    As far as the behavior of the Today button in the DateChooser in "datetime" mode, this is by design, and highly desirable: one of the most common actions that users take is to pick "Today" and then enter a specific time. If the chooser disappeared immediately upon clicking "Today", that would be a far worse UX.

    Comment


      #3
      In previous versions, such as 4.0, when opening the datechooser, the time grid came with the current system grid. That is what we require, without performing any initial filtering. I attach images of the behavior.

      13.0p
      Click image for larger version

Name:	DateRange 13.0p.png
Views:	120
Size:	27.6 KB
ID:	270985
      4.0p
      Click image for larger version

Name:	DateRange 4.0p.png
Views:	112
Size:	29.2 KB
ID:	270986

      in version 4, the time came without doing anything additional.

      What we want is that when the user clicks on the dateChooser calendar, it brings the current hour and minutes, as attached in the image.

      Comment


        #4
        A regular DateTimeItem with no value will show the current time in the DateChooser.

        DateRangeItems show two RelativeDateItems and the default time applied to a RelativeDateItem depends on its rangePosition - 00:00 for "start" and 23:59 for "end". This is very much expected behavior, given that RelativeDates are non-specific - you might choose a range of "Today" to "Today", and rangePosition is used to ensure it spans from the start of Today to the end of Today. There's no current public mechanism to modify this default behavior.

        Given this information, you may not want a change to the behavior here, but if you did, we could do so via Feature Sponsorship.

        Comment

        Working...
        X