I want to add date for projects in form. I used this code:
<div class="form-group">
<label>Finish time</label>
<input type="date" class="form-control" name="finish_time" id="finish_time">
</div>
How can I create a Persian calendar?
You should use a javascript package for persian date : here is a good one!
Code Sample:
<link type="text/css" rel="stylesheet" href="css/persianDatepicker.css" />
<script type="text/javascript" src="{{asset('js/jquery.min.js')}}"></script>
<script type="text/javascript" src="js/persianDatepicker.min.js"></script>
<div class="form-group">
<label>Finish time</label>
<input type="text" class="form-control" name="finish_time"
id="finish_time">
</div>
<script type="text/javascript">
$(function() {
$("#finish_time").persianDatepicker();
});
</script>
And use type="text"
instead of type="date"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With