Announcement

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

    Week number in DateChooser not always correct

    I'm creating a DateChooser with the following property:

    Code:
    	// definition
    	private class MyDateChooser extends DateChooser {
    		public MyDateChooser() {
    			setAttribute("autoClose", true, true);
    		}
    	}
    
    	// call
    	chooser = new MyDateChooser();
    	chooser.setFirstDayOfWeek(1);
    	chooser.setShowCancelButton(Boolean.TRUE);
    	chooser.setShowWeekChooser(Boolean.TRUE);
    	chooser.setShowTimeItem(Boolean.TRUE);
    I noticed an issue when picking a week number:
    1. Set the date to 30 jan. 2014. This is week 5.
    2. Use the week number picker in the upper left of the DateChooser to pick week 8.

    The result is that the month shown is now February, but week 5 is still highlighted.

    This is for v9.0p_2013-10-27/Pro Deployment (built 2013-10-27)

    Thanks for looking into this.

    #2
    Sorry for the delay - this is actually intended behavior.

    The week-chooser is a navigational aide - it's underlying purpose is to navigate so that the DateGrid shows the correct month.

    When a different month is selected, we "select" the week containing the current selected date, if it's visible - othwerwise, if you used the week-chooser, we select that week, or the middle one.

    However - we did fix a couple of missing CSS styles - now, you will see the selected date (January 30th, which is disabled/greyed out when viewing Feburary) with a selected style, as you would with a normal, enabled date, which makes this behavior more obvious.
    Last edited by Isomorphic; 10 Mar 2014, 21:56.

    Comment

    Working...
    X