budibase/packages/builder/src/components/common/DatePicker.svelte

21 lines
422 B
Svelte
Raw Normal View History

2019-07-13 11:35:57 +02:00
<script>
import Flatpickr from "svelte-flatpickr"
2020-09-01 23:00:30 +02:00
import { Label, Input } from "@budibase/bbui"
import 'flatpickr/dist/flatpickr.css'
2019-07-13 11:35:57 +02:00
const PICKER_OPTIONS = {
enableTime: true
}
export let label
export let value
2019-07-13 11:35:57 +02:00
</script>
<div class="bb-margin-m">
<Label small forAttr={'datepicker-label'}>{label}</Label>
<Flatpickr
options={PICKER_OPTIONS}
placeholder={label}
bind:value
/>
</div>