More work on the opening hours picker

This commit is contained in:
Pieter Vander Vennet 2020-10-06 01:37:02 +02:00
parent 4d139b45e6
commit 6563298d16
15 changed files with 321 additions and 100 deletions

23
test.ts
View file

@ -1,17 +1,30 @@
//*
import OpeningHoursPicker from "./UI/Input/OpeningHours/OpeningHoursPicker";
import {VariableUiElement} from "./UI/Base/VariableUIElement";
import {OH} from "./Logic/OpeningHours";
import opening_hours from "opening_hours";
const picker = new OpeningHoursPicker();
new VariableUiElement(picker.GetValue().map(OH.ToString)).AttachTo("extradiv");
picker.AttachTo("maindiv");
const oh =new opening_hours("mo 09:00-17:00;Tu 09:00-17:00;We 09:00-17:00");
console.log(oh)
/*/
window.setTimeout(() => {
picker.GetValue().setData([{
weekday: 1,
startHour: 11,
startMinutes: 0,
endHour: 17,
endMinutes: 0
}]);
}, 1000)
/*/
import {Utils} from "./Utils";
import {FixedUiElement} from "./UI/Base/FixedUiElement";
Utils.generateStats((stats) => {
new FixedUiElement(stats).AttachTo('maindiv')
new FixedUiElement(stats).AttachTo('maindiv')
})
//*/