Announcement

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

    DatePickerButton & DateChooser AutoChild

    The DateChooser displayed via the DatePickerButton doesn't seem to honour the dateChooser AutoChild, even though the button is documented as "... offers alternative access to the DateChooser...".


    An ImgButton that appears above the various views of the calendar and offers alternative access to a com.smartgwt.client.widgets.DateChooser to pick the current day.


    Can you please propose an alternative way to configure the following so that it applies to the DateChooser displayed by the DatePickerButton?

    Code:
    DateChooser dateChooser = new DateChooser();
    dateChooser.setEndYear(endYear);
    setAutoChildProperties("dateChooser", dateChooser);
    Thanks

    SmartClient Version: v9.1p_2014-11-09/Pro Deployment (built 2014-11-09)

    #2
    The DateChooser launched by the DatePickerButton is an AutoChild of the Calendar, not of the DatePickerButton. Did you already try to configure it via Calendar?

    Comment


      #3
      Yes, I applied the AutoChild to the Calendar.
      It only seems to have an impact on the DateChooser that appears when you have setShowDateChooser(true), not when you show the DateChooser via the DatePickerButton.
      The DateChooser shown by setShowDateChooser(true) has the correct end date, whereas the DateChooser shown by clicking the DatePickerButton does not.
      Regards

      Comment


        #4
        This is fixed for builds dated January 14 and later.

        Comment


          #5
          Thank you.

          Comment


            #6
            Fix looks good, thanks.

            I have an additional question related to this.

            When using the DateChooser launched by the DatePickerButton, when you click a Day in the DateChooser and the DateChooser automatically closes, it doesn't select that Day in the Calendar (it only brings you the Month of the Day clicked). Is there a way to have it go to the Month *and* select the Day you clicked in the DateChooser.

            Thanks

            Comment


              #7
              There is no concept of a date being "selected" in month or week Calendar views - if you try to select one with the mouse in month or week views, the Calendar will switch to the dayView, showing the date you clicked.

              If that's not what you meant, please clarify.

              Note that, as of 5.0, if you just want to style the cells for a particular date or time (in this case, the Calendar.chosenDate), in any view, then you can use a DateCSSTextCustomizer or DateStyleCustomizer.

              These customizers are not likely to be backported to 4.1.

              Comment


                #8
                I will try to clarify.

                In the Month view, if you click on a particular Day, it will change the style so that it displays as a light red colour (of course in the showcase, it also opens a dialog to add an event, however, if you close that dialog, the cell remains a light red colour indicating the Day is "Selected").

                When the user uses the date chooser to choose a specific day in the future, the date chooser closes and the calendar moves to the particular month of the chosen Day. I was kind of expecting that the style of the Day they picked in the date chooser would be changed to reflect that particular Day was selected through the date chooser.

                Regards

                Comment


                  #9
                  This selection-like styling was unintentional and has now been switched off for builds dated January 7 and later.

                  However, we will add a proper implementation of the feature you're after in 5.1.

                  Comment


                    #10
                    We've added Calendar.selectChosenDate, which will select the header and event cells of the chosenDate in the monthView.

                    Note that this is a new 5.1 feature only.

                    Comment


                      #11
                      We've added Calendar.selectChosenDate, which will select the header and event cells of the chosenDate in the monthView.
                      Thanks

                      This selection-like styling was unintentional and has now been switched off for builds dated January 7 and later.
                      Can you please elaborate on the changes made here as instead of a single Day styled red when the Day is clicked, the Days for the week become styled in red when a Day is clicked.

                      SmartClient Version: v9.1p_2015-02-07/Pro Deployment (built 2015-02-07)

                      Thanks

                      Comment


                        #12
                        The change was just to switch off selection - unfortunately, we switched off cell-selection, but not row-selection...

                        It's been fixed for builds dated February 11.

                        Comment

                        Working...
                        X