I want to add datetimepicker with two dates "From & To" and validate both dates in php with bootstrap datetimepicker -


my main problem set mindate 'from' date , maxdate 'to' date. can ?

my code :

$(document).ready(function(){  		$('#pickupdate').datetimepicker({  			format: 'yyyy-mm-dd hh:mm:ss',  			mindate: moment().format('l'),  			ignorereadonly: true,  		});  		  		$('#dropoffdate').datetimepicker({  			format: 'yyyy-mm-dd hh:mm:ss',  			mindate: moment().format('l'),  			ignorereadonly: true,  		});  	});
<link rel="stylesheet" type="text/css" media="screen" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.43/css/bootstrap-datetimepicker.css">  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.16.0/moment.min.js"></script>  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.43/js/bootstrap-datetimepicker.min.js"></script>      <div><label>pick date</label><input type="text" name="pickupdate" id="pickupdate" readonly placeholder="enter pickup date" value=""></div>    <div><label>drop off date</label><input type="text" name="dropoffdate" id="dropoffdate" readonly placeholder="enter drop off date" value=""></div>


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -