React-datepicker: Make date picker full screen in mobile or small screen resolution

Created on 28 Feb 2020  路  6Comments  路  Source: Hacker0x01/react-datepicker

Is your feature request related to a problem? Please describe.
I'm always frustrated when in mobile/small screen, date picker is truncated and not correctly displayed.

Describe the solution you'd like
Make date picker fill the screen.

Describe alternatives you've considered
Or show popup dialog to select date.

Additional context
WhatsApp Image 2020-02-24 at 9 40 23 AM

Most helpful comment

Portal is not helping much on devices. It's not 100% fullscreen, and it won't disable text input so a keyboard covers the calendar.

image

All 6 comments

All you need is "withPortal" attribute
selected={startDate}
onChange={date => setStartDate(date)}
withPortal
/>

Hi @RaudByorn, i've tried your solution and it works on ios devices, but it doesn't seem to work on android. any other work around?

Hi @maurusrv, I've checked it just now on Android and it works fine. Try it here https://reactdatepicker.com/ on example with "withPortal" attribute.

Yes. my mistake. it is indeed working. thanks for the reply anyway @RaudByorn!

Portal is not helping much on devices. It's not 100% fullscreen, and it won't disable text input so a keyboard covers the calendar.

image

@softshape here is solution #942

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lclemence picture lclemence  路  3Comments

pinturic picture pinturic  路  3Comments

arturictus picture arturictus  路  3Comments

flaurida picture flaurida  路  3Comments

ro-savage picture ro-savage  路  3Comments