-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added radio card, progress bar, datepicker #215
Conversation
Default Project
|
Project |
Default Project
|
Branch Review |
main
|
Run status |
|
Run duration | 00m 23s |
Commit |
|
Committer | Diyor Khaydarov |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
3
|
View all changes introduced in this branch ↗︎ |
templ DatePicker(props DatePickerProps) { | ||
{{ pageCtx := composables.UsePageCtx(ctx) }} | ||
{{ selected, _ := templ.JSONString(props.Selected) }} | ||
<div x-data={ fmt.Sprintf("datePicker({locale: '%s', mode: '%s', dateFormat: '%s', labelFormat: '%s', minDate: '%s', maxDate: '%s', selectorType: '%s', selected: %s})", pageCtx.Locale.String(), props.Mode, props.DateFormat, props.LabelFormat, props.MinDate, props.MaxDate, props.SelectorType, selected) }> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this be easier to do with templ
JSON calling? Like it's done in charts/charts.templ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How? fmt.Sprintf("datePicker(%s)", templ.JSONString(props))
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, you're not defining the function the same way I do in charts. Event the option you proposed looks better, don't u agree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check @diyor28
No description provided.