Skip to content

Commit 066f97f

Browse files
authored
Scheduler: fix toolbar demos to use fixed current date (DevExpress#31232)
1 parent 7147da7 commit 066f97f

23 files changed

+5
-10
lines changed

apps/demos/Demos/Scheduler/Toolbar/Angular/app/app.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ export interface Assignee {
1515
text: string;
1616
}
1717

18-
const ONE_MONTH_DAYS = 30;
1918
const addDays = (date, days) => new Date(new Date(date).setUTCDate(date.getUTCDate() + days));
2019
const now = new Date(new Date().setUTCHours(0, 0, 0, 0));
2120
const startOfTheWeek = addDays(now, -now.getUTCDay());
22-
const currentDate = addDays(now, ONE_MONTH_DAYS);
21+
const currentDate = new Date(2025, 5, 10);
2322
const currentStartOfTheWeek = addDays(currentDate, -currentDate.getUTCDay());
2423
const appointments: Appointment[] = [
2524
{

apps/demos/Demos/Scheduler/Toolbar/React/data.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ export interface Assignee {
99
id: number;
1010
}
1111

12-
const ONE_MONTH_DAYS = 30;
1312
const addDays = (date, days) => new Date(new Date(date).setUTCDate(date.getUTCDate() + days));
1413
const now = new Date(new Date().setUTCHours(0, 0, 0, 0));
1514
const startOfTheWeek = addDays(now, -now.getUTCDay());
16-
export const currentDate = addDays(now, ONE_MONTH_DAYS);
15+
export const currentDate = new Date(2025, 5, 10);
1716
const currentStartOfTheWeek = addDays(currentDate, -currentDate.getUTCDay());
1817
const data: Appointment[] = [
1918
{

apps/demos/Demos/Scheduler/Toolbar/ReactJs/data.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { DataSource } from 'devextreme-react/common/data';
22

3-
const ONE_MONTH_DAYS = 30;
43
const addDays = (date, days) => new Date(new Date(date).setUTCDate(date.getUTCDate() + days));
54
const now = new Date(new Date().setUTCHours(0, 0, 0, 0));
65
const startOfTheWeek = addDays(now, -now.getUTCDay());
7-
export const currentDate = addDays(now, ONE_MONTH_DAYS);
6+
export const currentDate = new Date(2025, 5, 10);
87
const currentStartOfTheWeek = addDays(currentDate, -currentDate.getUTCDay());
98
const data = [
109
{

apps/demos/Demos/Scheduler/Toolbar/Vue/data.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ type CustomAppointment = SchedulerTypes.Appointment & {
55
assigneeId: number[];
66
};
77

8-
const ONE_MONTH_DAYS = 30;
98
const addDays = (date, days) => new Date(new Date(date).setUTCDate(date.getUTCDate() + days));
109
const now = new Date(new Date().setUTCHours(0, 0, 0, 0));
1110
const startOfTheWeek = addDays(now, -now.getUTCDay());
12-
export const currentDate = addDays(now, ONE_MONTH_DAYS);
11+
export const currentDate = new Date(2025, 5, 10);
1312
const currentStartOfTheWeek = addDays(currentDate, -currentDate.getUTCDay());
1413
const data: CustomAppointment[] = [
1514
{

apps/demos/Demos/Scheduler/Toolbar/jQuery/data.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
const ONE_MONTH_DAYS = 30;
21
const addDays = (date, days) => new Date(new Date(date).setUTCDate(date.getUTCDate() + days));
32
const now = new Date(new Date().setUTCHours(0, 0, 0, 0));
43
const startOfTheWeek = addDays(now, -now.getUTCDay());
5-
const currentDate = addDays(now, ONE_MONTH_DAYS);
4+
const currentDate = new Date(2025, 5, 10);
65
const currentStartOfTheWeek = addDays(currentDate, -currentDate.getUTCDay());
76
const data = [
87
{
-4.2 KB
Loading
9 Bytes
Loading
-3.26 KB
Loading
7 Bytes
Loading
-3.77 KB
Loading

0 commit comments

Comments
 (0)