newforms icon indicating copy to clipboard operation
newforms copied to clipboard

Date/datepicker

Open dfilipovic39 opened this issue 9 years ago • 6 comments

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?

dfilipovic39 avatar Sep 24 '15 20:09 dfilipovic39

+1

patgod85 avatar Oct 21 '15 06:10 patgod85

+1

jmcarnicero avatar Dec 05 '15 13:12 jmcarnicero

+1

madmis avatar Jan 09 '16 10:01 madmis

+1

kylem038 avatar Apr 06 '17 15:04 kylem038

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 avatar Apr 07 '17 15:04 kylem038

@kylem038 dude u are a life-saver!!! My PM kept complaining why I can't have a datepicker on my formSet.

hestacio avatar Oct 27 '17 17:10 hestacio