Comments (1)
Hi @naveedali8086,
There are two ways on how to set the time:
- Setting the input's
value
before initializing the timepicker. - Using the
setValue
function of the timepicker instance.
To do number 2, you need to get the timepicker instance by calling the .data('mdtimepicker')
after the initialization and assigning it to a variable:
var picker = $('#picker').mdtimepicker({ readOnly: false, hourPadding: true, theme: 'dark' })
.data('mdtimepicker');
// set the value by calling setValue
picker.setValue('03:00 PM');
Note: If you changed the format
configuration, you should use that format when setting the time
from mdtimepicker.
Related Issues (14)
- minTime, maxTime features (like I used in duDatepicker) to block time, i.e falling into past. HOT 4
- writing own time
- PM reverts back to AM on timepicker close HOT 2
- how to block/disable past time selection HOT 2
- how to set step in mdtimepicker HOT 1
- Suggenstion: add custom theme as option HOT 1
- Show Minutes Only HOT 4
- readOnly: false option (and inline: true option) HOT 1
- Feature Request: Should the AMPM button on the top of the picker be clickable to change the period? HOT 1
- Uncaught TypeError: $(...).mdtimepicker is not a function HOT 6
- Set DEFAULTS HOT 2
- vue-3 Render Function Fails
- Code-Typo in Wiki HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mdtimepicker.