HTML Time Picker
📌 HTML Time Picker क्या है?
-
HTML में Time चुनने के लिए
<input type="time">
टैग का उपयोग किया जाता है। -
इसे Time Picker कहते हैं क्योंकि इसमें User घंटे और मिनट (HH:MM) चुन सकता है।
-
यह HTML5 का Feature है।
✨ Main Features of Time Picker
-
User Clock से Time चुन सकता है।
-
Default Format
HH:MM
(24-Hour Format) होता है। -
Attributes (
min
,max
,step
) से Control किया जा सकता है। -
Browser और Device के हिसाब से Design अलग हो सकता है (Mobile पर Digital Clock जैसा दिखेगा)।
✅ Basic Example: Time Picker
👉 इसमें User Class का Time चुन पाएगा।
🛠️ Time Picker Attributes
Attribute | काम | Example |
---|---|---|
min | Minimum Time सेट करता है | <input type="time" min="09:00"> |
max | Maximum Time सेट करता है | <input type="time" max="18:00"> |
step | Seconds या Minutes के Gap सेट करता है | <input type="time" step="600"> (हर 10 मिनट पर Time Select होगा) |
value | Default Time सेट करता है | <input type="time" value="10:30"> |
✅ Example with min, max, and step
👉 इस Example में User केवल सुबह 9:00 से शाम 6:00 तक का Time चुन पाएगा और हर 15 मिनट के Gap में Option मिलेगा।
No comments:
Post a Comment