Enh. Suggestions for sap.m.PlanningCalendar
Open
@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.
- 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
- Min and Max dates, customer wants to control how far into the past and future users can go
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.