Skip to content
Advertisement

Tag: flatpickr

Lit-element – Importing a component inside another component and then accessing the DOM of the imported component

I’ve honestly racked my brain on this for a couple days. I’m decently new to lit-element and web components in general. Basically, I’m building a new component called <date-picker> and it uses the Flatpickr plugin. This Date Picker component imports another component called <textfield>. Inside of that component there is a wrapper(.date-picker) with an input field and an icon. I

Flatpickr.js show first letter of the day only

I cannot find in the documentation how to make the first letter of the day show up only. By default it’s showing Mon Tue etc … I would like to be showing it like below example https://jsfiddle.net/wdL13cty/8/ Answer You can use the locale config option to customize the label as per your requirement. See the official documentation here: Localization Example:

Advertisement