Supports more
This commit is contained in:
@@ -338,6 +338,7 @@
|
||||
[:div.shrink {:x-data (hx/json {:value (:value params)
|
||||
:tippy nil
|
||||
:dp nil})
|
||||
"x-effect" "console.log('changed to' +value)"
|
||||
"@change-date.camel" "$dispatch('change')"
|
||||
}
|
||||
[:input
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
:end
|
||||
(atime/unparse-local atime/normal-date))})
|
||||
|
||||
:x-effect "console.log('periods are', periods)"
|
||||
:x-init "$watch('periods', ds => source_date= ds.length > 0 ? ds[0].end : null)" }
|
||||
[:template {:x-for "(v,n) in periods"}
|
||||
[:template {:x-for "(v,n) in periods" ":key" "n"}
|
||||
[:div
|
||||
[:input {:type "hidden"
|
||||
":name" "'periods[' + n + '][start]'"
|
||||
@@ -57,6 +58,8 @@
|
||||
(buttons/a-button- {"@click" "periods=[calendarYearPeriod(source_date)]"} [:span "Calendar year ("
|
||||
[:span {:x-text "parseMMDDYYYY(source_date).getFullYear()"}]
|
||||
")"])
|
||||
(buttons/a-button- {"@click" "periods=getTwelveCalendarMonthsPeriods(source_date)"} [:span "12 months, ending "
|
||||
[:span {:x-text "parseMMDDYYYY(source_date).toLocaleString('default', { month: 'long' })"}]])
|
||||
[:hr {:class "h-px my-1 bg-gray-200 border-0 dark:bg-gray-700"} ]
|
||||
(buttons/a-button- {"@click" "periods=getLastMonthPeriods()"} "Last Month")
|
||||
(buttons/a-button- {"@click" "periods=getMonthToDatePeriods()"} "Month to date")
|
||||
|
||||
Reference in New Issue
Block a user