1
0
Fork 0
mirror of synced 2024-09-19 18:59:06 +12:00
budibase/packages/builder/src/components/common/DatePicker.svelte

21 lines
422 B
Svelte
Raw Normal View History

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