Jump to content

Recommended Posts

I've got an HTML 5 date input box working on my site. Anyone know how to make the whole thing selectable like a drop down (select) box?

 

Currently you can only select it by clicking on the arrow at the far right of it. I don't mind about losing the cross or up and down arrows. I just want the field to be fully selectable like a drop down box.

 

Any ideas please? Thanks.

Link to comment
https://forums.phpfreaks.com/topic/301392-html5-date-input-type/
Share on other sites

If you're using the browsers native picker with a type="date" field then you pretty much just have to accept how that UI looks and works, there's not much you can do to change it.

 

If you really need to be able to select the entire field, then use a type="text" field with your own picker implementation (such jQuery UI's datepicker).

 

Or just use a select box with a list of dates if that is the look you're going for.

t'internet is an amazing thing if one is prepared to use it :tease-03:  :

 

Here and Here - both on page one of a well known search engine - may not be exactly what you are after, but there should be enough code between the two of them for you to hammer out what you need.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.