Posts

Showing posts with the label two dates difference

Difference Between two Dates using JQuery or Javascript?

Here code use difference between two dates. <!DOCTYPE html> <html> <head>   <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script></script> <link rel="stylesheet" type="text/css" href="style.css">  <script> $(document).ready(function(){     var $datepicker1 =  $( "#datepicker1" );     var $datepicker2 =  $( "#datepicker2" );     $datepicker1.datepicker();     $datepicker2.datepicker({          onClose: function() {             var fromDate = $datepicker1.datepicker('getDate');             var toDate = $datepicker2....