Search code examples
javascripthtmlbootstrap-4mojolicious

I'm looking for a "date-picker" that works for all the browsers


This is how it should look on all the browsers: enter image description here

And this is how it looks on Safari, for example: enter image description here

This is the code that I am using at the moment:

<%= date_field 'birth_date', rel => 'birth_date',
        class => "form-control", required => undef %>

Solution

  • You're using the Mojolicious date_field tag helper. This generates a <input type="date"> HTML input field.

    But support for the date input isn't universal. In particular, you'll see that Safari doesn't support it.

    So you'll need to use some kind of plugin, I guess. If you're using jQuery, then one of these might work for you.