add datepicker range and test search

This commit is contained in:
Peter Clement 2022-10-19 10:16:54 +01:00
parent 4665d6930d
commit 71439d4b82
3 changed files with 9 additions and 2 deletions

View File

@ -17,7 +17,7 @@
export let timeOnly = false
export let ignoreTimezones = false
export let time24hr = false
export let range = false
const dispatch = createEventDispatcher()
const flatpickrId = `${uuid()}-wrapper`
let open = false
@ -41,6 +41,7 @@
time_24hr: time24hr || false,
altFormat: timeOnly ? "H:i" : enableTime ? "F j Y, H:i" : "F j, Y",
wrap: true,
mode: "range" || null,
appendTo,
disableMobile: "true",
onReady: () => {

View File

@ -14,7 +14,7 @@
export let placeholder = null
export let appendTo = undefined
export let ignoreTimezones = false
export let range = false
const dispatch = createEventDispatcher()
const onChange = e => {
@ -34,6 +34,7 @@
{time24hr}
{appendTo}
{ignoreTimezones}
{range}
on:change={onChange}
/>
</Field>

View File

@ -1,6 +1,7 @@
<script>
import {
ActionButton,
DatePicker,
Layout,
Pagination,
Select,
@ -98,6 +99,10 @@
options={Object.values(triggers)}
/>
</div>
<div>
<DatePicker range label="Filter range" />
</div>
<div class="split-buttons">
<ActionButton on:click={modal.show} icon="SaveAsFloppy"
>Create new backup</ActionButton