Datepicker
Description
Bulma and renderless Flatpickr wrappers for Enso UI.
Installation
Install the package:
yarn add @enso-ui/datepicker
Features
- ships Bulma-styled
DatepickerandEnsoDatepickercomponents - exposes the renderless
CoreDatepickerfor custom input renderers - wraps Flatpickr with locale switching, time/date modes, and clear-button handling
Usage
<script setup>
import { EnsoDatepicker } from '@enso-ui/datepicker/bulma';
</script>
<EnsoDatepicker v-model="date" />
API
Datepicker
Bulma-styled input wrapper around CoreDatepicker.
Import: @enso-ui/datepicker/bulma
Props:
isDanger: boolean = falseisSmall: boolean = falseisWarning: boolean = falseisSuccess: boolean = falseplaceholder: string = 'Select Date'readonly: boolean = false
Methods:
clear()
EnsoDatepicker
Convenience wrapper that derives the display format and locale from Enso app preferences.
Import: @enso-ui/datepicker/bulma
Props:
altFormat: string | null = nulltime: boolean = false
CoreDatepicker
Renderless Flatpickr wrapper.
Import: @enso-ui/datepicker/renderless
Props:
altInput: boolean = falsealtFormat: string | null = nulldisabled: boolean = falsedisableClear: boolean = falseformat: string = 'Y-m-d'locale: string = 'en'max: string | null = nullmin: string | null = nullreadonly: boolean = falsetime: boolean = falsetime12hr: boolean = falsetimeOnly: boolean = falsemodelValue: string | Date | Array | nullweekNumbers: boolean = false
Events:
update:modelValuevalue-updated
Slot props:
clearButtonclearEventsinputBindingsreadonlytimeOnly
Methods:
clear()reset()
Depends On
Contributions
are welcome. Pull requests are great, but issues are good too.
Thank you to all the people who already contributed to Enso!