Re: (Circa end of 2021) Localization issues with input type=date?

2022-11-10 Thread Matthias Kestenholz
Hi,

On Thu, Nov 10, 2022 at 9:40 AM Jacob Rief  wrote:

> How about ditching the JS based datepicker altogether and replace it
> against the built-in datepicker offered by modern browsers? This would also
> help users of mobile devices because they already have good internal
> implementations to select a date. I agree that on desktop browsers the
> built-in datepicker does not really look nice, but IMO still works way
> better than the  widget, (ab-)used for date types as
> currently implemented in Django.


I'll second this. I'm not sure about ditching custom date pickers on all
public-facing websites (yet) but I think it's definitely a good idea for
administration panels. I have had good success with this in the last years.

The problem (as much too often) is Safari. Safari only has proper support
since 14.1, released only ~18 months ago (https://caniuse.com/input-datetime)
I haven't removed the date-input-polyfill yet. That may be a reason to wait
a bit, sad as it is.


Thanks,
Matthias

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANvPqgA6WQ29aBJ5QFnf7Ygig88%3DYXv-rVU1HgUzXCoK-DQHjA%40mail.gmail.com.


Re: (Circa end of 2021) Localization issues with input type=date?

2022-11-10 Thread Jacob Rief
How about ditching the JS based datepicker altogether and replace it 
against the built-in datepicker offered by modern browsers? This would also 
help users of mobile devices because they already have good internal 
implementations to select a date. I agree that on desktop browsers the 
built-in datepicker does not really look nice, but IMO still works way 
better than the  widget, (ab-)used for date types as 
currently implemented in Django. 

A compromise for the Django Admin could be to detect the CSS query "@media 
(pointer:coarse)". If this matches, it's a mobile device and we can fall 
back on the internal date selector. Otherwise use a nice looking JS 
implementation.

There is a good article on CSS Tricks about date input types:
https://css-tricks.com/better-form-inputs-for-better-mobile-user-experiences/#aa-a-quick-detour-into-date-types

Btw., since PR#15806  is 
stale, may I reclaim it?

– Jacob

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/8411cb4f-b93c-4e5b-9dd4-d540baee83a1n%40googlegroups.com.