mirror of
https://github.com/axzilla/templui.git
synced 2025-02-21 00:12:48 +00:00
fix: add data-date-format on datepicker to get correct format
This commit is contained in:
parent
48d807ce6a
commit
b17507a717
@ -44,10 +44,11 @@ type DatepickerProps struct {
|
||||
// - Attributes: Additional HTML attributes to apply to the datepicker input element. Default: nil
|
||||
templ Datepicker(props DatepickerProps) {
|
||||
<div
|
||||
data-date-format={ props.Format }
|
||||
x-data="{
|
||||
datePickerOpen: false,
|
||||
datePickerValue: '',
|
||||
datePickerFormat: '{ templ.EscapeString(props.Format) }',
|
||||
datePickerFormat: $el.getAttribute('data-date-format'),
|
||||
datePickerMonth: '',
|
||||
datePickerYear: '',
|
||||
datePickerDay: '',
|
||||
|
@ -1,8 +1,6 @@
|
||||
package showcase
|
||||
|
||||
import (
|
||||
"github.com/axzilla/goilerplate/internals/ui/components"
|
||||
)
|
||||
import "github.com/axzilla/goilerplate/internals/ui/components"
|
||||
|
||||
templ DatepickerShowcase() {
|
||||
<div class="flex justify-center items-center border rounded-md py-16 px-4">
|
||||
|
Loading…
x
Reference in New Issue
Block a user