Refactor calendar UI and time range configuration
Updates time axis and calendar to focus on 6-18 hour range Modifies CSS to support nested selectors and time range configuration Enhances DateService to support flexible week date generation
This commit is contained in:
parent
e2c79c067f
commit
899c600e44
3 changed files with 83 additions and 84 deletions
|
|
@ -12,9 +12,9 @@ export class DateService {
|
|||
return new Intl.DateTimeFormat(this.config.locale, { weekday: format }).format(date);
|
||||
}
|
||||
|
||||
getWeekDates(offset = 0): string[] {
|
||||
getWeekDates(offset = 0, days = 7): string[] {
|
||||
const monday = dayjs().startOf('week').add(1, 'day').add(offset, 'week');
|
||||
return Array.from({ length: 7 }, (_, i) =>
|
||||
return Array.from({ length: days }, (_, i) =>
|
||||
monday.add(i, 'day').format('YYYY-MM-DD')
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ export class DemoApp {
|
|||
}
|
||||
};
|
||||
|
||||
// Render time axis
|
||||
this.timeAxisRenderer.render(document.getElementById('time-axis') as HTMLElement);
|
||||
// Render time axis (06:00 - 18:00)
|
||||
this.timeAxisRenderer.render(document.getElementById('time-axis') as HTMLElement, 6, 18);
|
||||
|
||||
// Init scroll synkronisering
|
||||
this.scrollManager.init(this.container);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue