Skip to content

amiryxe/rtl-timepicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RTL Time Picker

RTL Support and flexible to change language.

View Demo

How to use

  1. Make sure your Project included jQuery library
  2. Include mdtimepicker.css and mdtimepicker.js like this:
<link rel="stylesheet" href="mdtimepicker.css" />
<script src="mdtimepicker.js"></script>
  1. Create a input for Time Picker
<input type="text" id="timepicker" />
  1. 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