UI5 / UI5/openui5

Enh. Suggestions for sap.m.PlanningCalendar

Open
#890 4 comments 0 reactions 1 assignee View on GitHub

@petyabegovska is already working on this.

Since Mar 22, 2022.

contribution welcome enhancement
Dominant language
JavaScript
Stars
3.3k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

OpenUI5 version: 1:36.0

I have been working on an extension of the PlanningCalendar, below are some the changes i have made which i think could be included. All changes came from customer feature requests. I would make a PR but guessing some changes already in pipeline.

  1. SubIntervals can be set on the PlanningCalendarView but not directly on the PlanningCalendar, customer wants to see intervals every 15 minutes when on hour view
  2. Min and Max dates, customer wants to control how far into the past and future users can go
  3. EndDate, needed for Selecting Data for the current view, need to be able to determine both the StartDate and the EndDate
    eg
 SELECT * FROM Appointments WHERE Start < EndDate AND End > StartDate 

example code

  metadata: {
         properties: {
              minDate: { type: "object", group: "Data" },
              maxDate: { type: "object", group: "Data" },
              showSubIntervals: { type: "boolean", group: "Appearance", defaultValue: false}

   ....

              PlanningCalendar.prototype.setViewKey = function(sKey) {
               ..
                oView.setShowSubIntervals(this.getShowSubIntervals()); //1  a getView would be nice

                if (this.getMinDate() &&  this._oTimeInterval) {  //2
                    this._oTimeInterval._oMinDate = new UniversalDate(this.getMinDate());
                }

                if (this.getMaxDate() && this._oTimeInterval) { //2
                    this._oTimeInterval._oMaxDate = new UniversalDate(this.getMaxDate());
                }     
            },
...
            PlanningCalendar.prototype.getRowEndDate = function() {
                // this._iRowSize = oCalendarRow._iRowSize; - derived @ onBeforeRendering
                return new Date(this.getStartDate().getTime() + this._iRowSize);  //3
            },

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.