From 03c2c655b13a39084a11bf0b1ab065833d0af588 Mon Sep 17 00:00:00 2001 From: Yury Uvarov Date: Tue, 17 Dec 2024 13:22:28 +0300 Subject: [PATCH] update main.ts --- demo/pages/lang/main.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/demo/pages/lang/main.ts b/demo/pages/lang/main.ts index 0d7400f..0f77ee2 100644 --- a/demo/pages/lang/main.ts +++ b/demo/pages/lang/main.ts @@ -6,7 +6,7 @@ const options: Options = { type: 'multiple', selectionDatesMode: 'multiple-ranged', disableDatesGaps: true, - // disableDatesPast: true, + disableDatesPast: true, dateMin: '2021-02-01', dateMax: '2025-11-30', displayDatesOutside: false, @@ -65,12 +65,11 @@ const options: Options = { }; document.addEventListener('DOMContentLoaded', () => { - const calendar = new Calendar('#calendar', options); + const calendar = new Calendar('#calendar'); calendar.init(); - // const btnSetEl = document.querySelector('#set-options'); - // btnSetEl?.addEventListener('click', () => { - // calendar.set(options, { dates: false }); - // console.log(calendar); - // }); + const btnSetEl = document.querySelector('#set-options'); + btnSetEl?.addEventListener('click', () => { + calendar.set(options, { dates: false }); + }); });