newforms
newforms copied to clipboard
Date/datepicker
I wonder why is date/date-time input a simple text input? Shouldn't it be a proper input type so the browser can handle the input format? Aside from that what would be a proper way to implement a datepicker, using a widget maybe? Unfortunately i cant seem to find a good resource for implementing a widget, can you help me with that?
+1
+1
+1
+1
Found a way to change the DateField from a text input to a date input. We did end up using a widget. Our implementation looked like this:
date: Forms.DateField({
required: true,
label: 'Date',
widget: Forms.TextInput({ attrs: { type: 'date' } }),
}),
@kylem038 dude u are a life-saver!!! My PM kept complaining why I can't have a datepicker on my formSet.