jQuery Date pciker in Laravel | Change date format in laravel | Chamge date format in html

 

 Today i will show you

How to Change Date format as like dd-mm-yy or dd/mm/yy or yy-mm-dd or yy/mm/dd

jQuery Date picker 

Here  i share create blade file bellow this file

create.blade.php

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>jQuery UI Datepicker - Default functionality</title>
  <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

  <script>
  $( function() {
    $( "#datepicker" ).datepicker({
      dateFormat: "dd-mm-yy",
      changeMonth: true,
       changeYear: true,
       showOn: "both",
       buttonText: "<i class='fa fa-calendar'></i>"
    });
  });
  </script>

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


 jQuery datepicker link: https://jqueryui.com/datepicker/


No comments

Powered by Blogger.