Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<input type="date"> is not working in mozilla

<!DOCTYPE html>
<html>
<body>

<form>
  Birthday: <input type="date" id="datepicker">
  <input type="submit">
</form>

</body>
</html>

I want to pick date from the calender. I have used Date input from HTML5 this code is working fine in IE and Chrome and not working in Mozilla please help me to fix the code

like image 824
Teja Kundaikar Avatar asked Nov 27 '25 21:11

Teja Kundaikar


1 Answers

The HTML element is a specific version of the element used to create an input field accepting a date.

Browsers generate a control for entering, and changing, the date. This date includes a year, month and day. The control itself varies from one browser to another; browsers not supporting this type will display a simple text control.

Read more

use datetime picker jquery plugin  will be a good option 

Read this

or try this code :-

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>jQuery UI Datepicker - Default functionality</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script>
  $(function() {
    $( "#datepicker" ).datepicker();
  });
  </script>
</head>
<body>

<p>Date: <input type="text" id="datepicker"></p>


</body>
</html>
like image 165
Abhishek Sharma Avatar answered Nov 29 '25 12:11

Abhishek Sharma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!