2019-07-13 21:35:57 +12:00
|
|
|
<script>
|
2020-09-09 23:06:04 +12:00
|
|
|
import Flatpickr from "svelte-flatpickr"
|
2020-09-02 09:00:30 +12:00
|
|
|
import { Label, Input } from "@budibase/bbui"
|
2020-09-09 23:06:04 +12:00
|
|
|
import 'flatpickr/dist/flatpickr.css'
|
2019-07-13 21:35:57 +12:00
|
|
|
|
2020-09-09 23:06:04 +12:00
|
|
|
const PICKER_OPTIONS = {
|
|
|
|
enableTime: true
|
|
|
|
}
|
2019-08-07 20:03:49 +12:00
|
|
|
|
2020-09-09 23:06:04 +12:00
|
|
|
export let label
|
|
|
|
export let value
|
2019-07-13 21:35:57 +12:00
|
|
|
</script>
|
|
|
|
|
2020-08-23 08:34:46 +12:00
|
|
|
<div class="bb-margin-m">
|
2020-09-02 08:28:38 +12:00
|
|
|
<Label small forAttr={'datepicker-label'}>{label}</Label>
|
2020-09-09 23:06:04 +12:00
|
|
|
<Flatpickr
|
|
|
|
options={PICKER_OPTIONS}
|
|
|
|
placeholder={label}
|
|
|
|
bind:value
|
|
|
|
/>
|
2020-09-09 05:03:41 +12:00
|
|
|
</div>
|