RTL Support and flexible to change language.
- Make sure your Project included jQuery library
- Include
mdtimepicker.css
andmdtimepicker.js
like this:
<link rel="stylesheet" href="mdtimepicker.css" />
<script src="mdtimepicker.js"></script>
- Create a input for Time Picker
<input type="text" id="timepicker" />
- Add this code to
Script
tag
$(document).ready(function(){
$('#timepicker').mdtimepicker(); //Initializes the time picker
});
// Example of more configs:
$("#timepicker").mdtimepicker({
timeFormat: "hh:mm:ss.000", // format of the time value (data-time attribute)
format: "hh:mm tt", // format of the input value
readOnly: false, // determines if input is readonly
hourPadding: false,
theme: "green",
okLabel: "تائید",
cancelLabel: "انصراف",
});
Developed based on MDTimePicker