How to style HTML5 input type=“datetime-local” [duplicate]


Tags: html,html5,css3,validation,datetime

Problem :

This question already has an answer here:

I want to style the calendar section of input type="datetime-local". If you refer to this link, you will know what i am talking about.

http://test.csswg.org/suites/css-transforms-1_dev/nightly-unstable/html/transform-input-013.htm

For selecting the date, an arrow is provided. Now the calender pops up. I neeed to style it. for e.g change the color of text, background-color of the calendar.

Any idea how to do this ? i didnt see any documentation when i searched for it online.



Solution :

You can use Jquery UI link here https://jqueryui.com/datepicker/

And style it just like styling a table, see fiddle for an example: https://jsfiddle.net/DIRTY_SMITH/rupbwpx0/

HTML and JQuery

  <p>Date: <input type="text" id="datepicker"></p>
  <script>
  $(function() {
    $( "#datepicker" ).datepicker();
  });
  </script>

CSS

td{background-color: lightblue;}
thead{background-color: lightgreen;}

    CSS Howto..

    How to develop Desktop Apps using HTML/CSS/JavaScript? [closed]

    How to make div 10% of device screen height css

    Any Idea how this web site acheives a fluid/liquid layout [closed]

    How to make my HTML suitable for Mobile View

    how to get the site to not collapse with css

    How to apply a transition effect to some text when hovering over an icon?

    How to pause a CSS keyframe animation when it ends the first cycle?

    How to hide elements in mobile devices? CSS

    How can I workaround this CSS anomaly?

    CSS & HTML & JQuery - How to display a div OVER other divs and set to them a shady background

    Displaying the first in simple Show / Hide content menu with active a

    How to change value stylesheet_url in wordpress?

    How is it that CSS borders create a triangle?

    How to Center Rotated text with CSS

    How to change CSS Class of an image in ListView depending on content in ASP.NET // C#

    Thai line breaking: how to break Thai text effectively

    How to vertically center multiline text with an image on its left?

    How to use PHP to get the value of a star rating widget?

    How to? CSS “Position:Absolute” constant Margin-Top? Possible?

    How Polymer Hero Transition works

    How to make
    , , or list display tabular data as a table?

    How to fit in an image inside span tag when onclick?

    How to get messages column up on the right?

    How do I position text within a box with css?

    How to position background image horizontally left and vertically center?

    How to use more times css transform property?

    How to create a nested vertical menu with horizontally sub-menus using css

    How can I add a red border to this box (an a tag) when the mouse is on (hover) the box?

    How to factor a color and boder-color into a single CSS style and apply it on other parts of the CSS styles

    How to avoid CSS selector applying to more than one level of descendants