Uploaded image for project: 'ZK Calendar'
  1. ZK Calendar
  2. ZKCAL-106

Provide a next/previous/move weekOrMonth API

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.2.0
    • 3.1.0, 3.1.1
    • Security Level: Jimmy
    • None

      User Story

      As a developer, I want to create a "work week" type of calendar display, in which I only want to display some of days.

      I also want the user to be able to move between the same days of the weeks to the next and previous weeks, or to the next and previous months if in month mode.

      Currently, the next/previous/move page API will move the calendar to the next previous or multiple increments of the same day span.

      (ex. if I currently display days 1,2,3 of the month, next page will display days 4,5,6)

      In my use case, I want to display the same dates, but one week before or after.

      (ex if I was displaying monday 1, tuesday 2, wednesday 3 of the month, I want next page to be monday 8, Tuesday 9, Wednesday 10 of the month, etc.)

      Acceptance Criteria

      See attached CalendarExt POC implementation

      Details

      When using attached POC class:

       

       

      
      // when switching view to week view, or when creating the calendar in week view, set Monday as the first day of the rendered week.
      
              TimeZone timeZone = calendars.getDefaultTimeZone();
              Calendar cal = Calendar.getInstance(timeZone);
              cal.setTime(calendars.getCurrentDate());
              cal.set(Calendar.DAY_OF_WEEK, 2); // create "monday of currently selected week" date
              calendars.setCurrentDate(cal.getTime()); // assign the current date as Monday of currently selected week
      
      ...
      
      	@Listen("onClick = #next")
      	public void gotoNext(){
      		calendars.nextMonthOrWeek();
      	}
      	@Listen("onClick = #prev")
      	public void gotoPrev(){
      		calendars.previousMonthOrWeek();
      	}
      
      

       

            hawk hawk
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: