forked from MapComplete/MapComplete
More work on OpeningHours picker
This commit is contained in:
parent
4cce18f818
commit
0714327d66
11 changed files with 397 additions and 25 deletions
14
test.ts
14
test.ts
|
@ -1,3 +1,13 @@
|
|||
import {Basemap} from "./Logic/Leaflet/Basemap";
|
||||
import OpeningHours, {OpeningHour} from "./UI/Input/OpeningHours";
|
||||
import {VariableUiElement} from "./UI/Base/VariableUIElement";
|
||||
|
||||
console.log(Basemap.ProvidedLayer("Stamen.Toner"))
|
||||
|
||||
let oh = new OpeningHours();
|
||||
oh.AttachTo('maindiv');
|
||||
|
||||
oh.GetValue().addCallback(data => console.log(data))
|
||||
|
||||
new VariableUiElement(oh.GetValue().map(ohs => {
|
||||
return ohs.map((oh: OpeningHour) => oh.weekdayStart + " " + oh.startHour + ":" + oh.startMinutes + " --> " +
|
||||
oh.weekdayEnd + " " + oh.endHour + ":" + oh.endMinutes).join(",")
|
||||
})).AttachTo("extradiv");
|
Loading…
Add table
Add a link
Reference in a new issue