Skip to content
Snippets Groups Projects
Commit e82fb04b authored by Fanna Lautenbach's avatar Fanna Lautenbach
Browse files

fix zoom; span length and zoom to current time

parent 6784a4d1
No related branches found
No related tags found
1 merge request!1153New Week View
...@@ -218,6 +218,10 @@ ...@@ -218,6 +218,10 @@
} }
.timeline-zoom-and-move { .timeline-zoom-and-move {
.p-dropdown {
width: 7rem !important;
}
.zoom-selector-container { .zoom-selector-container {
margin-right: 1rem; margin-right: 1rem;
......
...@@ -108,7 +108,8 @@ function getZoomTimesHoursMinutes(selectedZoomLevel, selectedTime) { ...@@ -108,7 +108,8 @@ function getZoomTimesHoursMinutes(selectedZoomLevel, selectedTime) {
* @return {{start: moment, end: moment}} * @return {{start: moment, end: moment}}
*/ */
export function getZoomTimes(selectedZoomLevel, selectedTime, startDate) { export function getZoomTimes(selectedZoomLevel, selectedTime, startDate) {
let newSelectedTime = moment(startDate).format(UIConstants.CALENDAR_DATETIME_FORMAT) const currentTime = moment().utc().format(UIConstants.CALENDAR_TIME_FORMAT).split(":")
let newSelectedTime = moment(moment(startDate).set({hour: currentTime[0], minutes: currentTime[1]})).format(UIConstants.CALENDAR_DATETIME_FORMAT)
if (selectedTime !== undefined) { if (selectedTime !== undefined) {
const selectedMoment = moment(moment(startDate).format(UIConstants.CALENDAR_DEFAULTDATE_FORMAT) + " " + selectedTime, UIConstants.CALENDAR_DATETIME_FORMAT); const selectedMoment = moment(moment(startDate).format(UIConstants.CALENDAR_DEFAULTDATE_FORMAT) + " " + selectedTime, UIConstants.CALENDAR_DATETIME_FORMAT);
newSelectedTime = selectedMoment.isValid() ? selectedMoment : newSelectedTime newSelectedTime = selectedMoment.isValid() ? selectedMoment : newSelectedTime
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment