P
P
psyhO_octopus2015-07-23 16:04:11
css
psyhO_octopus, 2015-07-23 16:04:11

How to show custom calendar as native input[type=date] on mobile devices?

I have a custom datepicker but on mobile I would like to show native input. Question two:

  1. Does it even make sense?
  2. If yes, what is the best way to do it?

I see two difficulties: how to understand what to show when (not to tie to the width of the screen), different date formats for custom and native calendars (plus different browsers)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sasha, 2015-07-23
@userAlexander

There's a meaning.
Because less load, more convenient, more familiar.
Use the modernizr library to determine the touch device, or rather the desktop, and from it already initialize the calendar plugin.
As a result, if the user logs in through a mobile device, the calendar will be default.
You can try to resolve everything only with the help of CSS, also through the class.
Just don't show the calendar generated by the plugin.
Need to test.
I hope the point is clear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question