Datetime fields example
With custom ids
How it looks (preview)
How to call this example
<%= render "components/datetime_fields", {
prefix: "edition",
field_name: "first_published_at",
year: {
id: "edition_first_published_year",
name: "Year",
width: 4
},
month: {
id: "edition_first_published_month",
name: "Month",
width: 2
},
day: {
id: "edition_first_published_day",
name: "Day",
width: 2
},
hour: {
id: "edition_first_published_hour"
},
minute: {
id: "edition_first_published_minute"
}
} %>