field-datetime
তারিখ ও সময় datetime.js যে চারটি ফিল্ড উন্নত করে, প্রতিটির নিচে থাকে তার নিজস্ব নেটিভ ইনপুট, যাতে স্ক্রিপ্ট ছাড়া পাঠক সাদামাটা নিয়ন্ত্রণটি পান, ভাঙা কিছু নয়।
একটিই ইনপুটে তারিখ আর সময়, একটিই মান।
প্রতিটি উদাহরণ সত্যিই চলে, কিন্তু এর লিংকগুলো কোথাও নিয়ে যায় না। HTML কপি করার জন্য মার্কআপ দেখায়।
উন্নত ইনপুট: লিখুন "আগামীকাল" বা "৩ সপ্তাহ পরে"
যে শব্দগুলো এটি পড়ে, সেগুলো data-rst-date-words-এ আছে, এখানে পাতার ভাষায়। i18n/<lang>.json-এ সেগুলো বারোটি ভাষায় আছে, তাই পাতা যে ভাষাতেই হোক, ফিল্ডটি সেটি পড়তে পারে।
এটি <section rst-box><form rst-form>-এর ভেতরে রাখুন।
<div rst-field >
<label rst-field-label for ="field-datetime_live" >প্রকাশের তারিখ</label >
<input rst-input id ="field-datetime_live" name ="field-datetime_live" type ="datetime-local" value ="2026-09-04T19:30" aria-describedby ="field-datetime_live-hint" data-rst-date data-rst-date-words ="{"ago":"আগে","am":"সকাল|পূর্বাহ্ন|am","at":"টায়|এ","day":"দিন","hour":"ঘণ্টা|ঘন্টা","in":"পরে|মধ্যে","last":"গত|আগের","midnight":"মধ্যরাত","minute":"মিনিট","month":"মাস","next":"পরের|আগামী","noon":"দুপুর","pm":"বিকাল|সন্ধ্যা|রাত|pm|বিকেল","today":"আজ","tomorrow":"আগামীকাল|কাল","week":"সপ্তাহ","yesterday":"গতকাল"}" data-rst-date-set ="নির্ধারণ করুন" data-rst-date-hint ="চেষ্টা করুন: {example}" data-rst-date-pick ="ক্যালেন্ডার খুলুন" data-rst-date-calendar ="ক্যালেন্ডার" data-rst-date-prev-month ="আগের মাস" data-rst-date-next-month ="পরের মাস" data-rst-date-results ="{n}টি পরামর্শ" data-rst-date-result-one ="১টি পরামর্শ" data-rst-date-quick-today ="আজ" data-rst-date-quick-tomorrow ="আগামীকাল" data-rst-date-quick-next-week ="এক সপ্তাহ পরে" data-rst-date-quick-plus-1h ="এক ঘণ্টা পরে" data-rst-date-quick-plus-2h ="দুই ঘণ্টা পরে" data-rst-date-quick-end-of-day ="সেই দিনের শেষে" data-rst-date-quick-next-day ="পরের দিন একই সময়ে" >
<small rst-field-hint id ="field-datetime_live-hint" >যখন এটি চালু হবে।</small >
</div >
আবশ্যিক, একটি ত্রুটিসহ
এটি <section rst-box><form rst-form>-এর ভেতরে রাখুন।
<div rst-field >
<label rst-field-label for ="field-datetime_error" >প্রকাশের তারিখ <span rst-field-required aria-hidden ="true" >*</span ></label >
<input rst-input id ="field-datetime_error" name ="field-datetime_error" type ="datetime-local" required aria-invalid ="true" aria-describedby ="field-datetime_error-error" data-rst-date data-rst-date-words ="{"ago":"আগে","am":"সকাল|পূর্বাহ্ন|am","at":"টায়|এ","day":"দিন","hour":"ঘণ্টা|ঘন্টা","in":"পরে|মধ্যে","last":"গত|আগের","midnight":"মধ্যরাত","minute":"মিনিট","month":"মাস","next":"পরের|আগামী","noon":"দুপুর","pm":"বিকাল|সন্ধ্যা|রাত|pm|বিকেল","today":"আজ","tomorrow":"আগামীকাল|কাল","week":"সপ্তাহ","yesterday":"গতকাল"}" data-rst-date-set ="নির্ধারণ করুন" data-rst-date-hint ="চেষ্টা করুন: {example}" data-rst-date-pick ="ক্যালেন্ডার খুলুন" data-rst-date-calendar ="ক্যালেন্ডার" data-rst-date-prev-month ="আগের মাস" data-rst-date-next-month ="পরের মাস" data-rst-date-results ="{n}টি পরামর্শ" data-rst-date-result-one ="১টি পরামর্শ" data-rst-date-quick-today ="আজ" data-rst-date-quick-tomorrow ="আগামীকাল" data-rst-date-quick-next-week ="এক সপ্তাহ পরে" data-rst-date-quick-plus-1h ="এক ঘণ্টা পরে" data-rst-date-quick-plus-2h ="দুই ঘণ্টা পরে" data-rst-date-quick-end-of-day ="সেই দিনের শেষে" data-rst-date-quick-next-day ="পরের দিন একই সময়ে" >
<small rst-field-error id ="field-datetime_error-error" >আজকের পরের একটি তারিখ বেছে নিন।</small >
</div >
সীমা বেঁধে দেওয়া
এটি <section rst-box><form rst-form>-এর ভেতরে রাখুন।
<div rst-field >
<label rst-field-label for ="field-datetime_bounded" >এই বছরের মধ্যে</label >
<input rst-input id ="field-datetime_bounded" name ="field-datetime_bounded" type ="datetime-local" value ="2026-09-04T19:30" min ="2026-01-01T00:00" max ="2026-12-31T23:59" data-rst-date data-rst-date-words ="{"ago":"আগে","am":"সকাল|পূর্বাহ্ন|am","at":"টায়|এ","day":"দিন","hour":"ঘণ্টা|ঘন্টা","in":"পরে|মধ্যে","last":"গত|আগের","midnight":"মধ্যরাত","minute":"মিনিট","month":"মাস","next":"পরের|আগামী","noon":"দুপুর","pm":"বিকাল|সন্ধ্যা|রাত|pm|বিকেল","today":"আজ","tomorrow":"আগামীকাল|কাল","week":"সপ্তাহ","yesterday":"গতকাল"}" data-rst-date-set ="নির্ধারণ করুন" data-rst-date-hint ="চেষ্টা করুন: {example}" data-rst-date-pick ="ক্যালেন্ডার খুলুন" data-rst-date-calendar ="ক্যালেন্ডার" data-rst-date-prev-month ="আগের মাস" data-rst-date-next-month ="পরের মাস" data-rst-date-results ="{n}টি পরামর্শ" data-rst-date-result-one ="১টি পরামর্শ" data-rst-date-quick-today ="আজ" data-rst-date-quick-tomorrow ="আগামীকাল" data-rst-date-quick-next-week ="এক সপ্তাহ পরে" data-rst-date-quick-plus-1h ="এক ঘণ্টা পরে" data-rst-date-quick-plus-2h ="দুই ঘণ্টা পরে" data-rst-date-quick-end-of-day ="সেই দিনের শেষে" data-rst-date-quick-next-day ="পরের দিন একই সময়ে" >
</div >
Plain: নিছক নেটিভ ইনপুট
উন্নত করার কোনো বৈশিষ্ট্যই নেই, তাই datetime.js কিছুই খুঁজে পায় না। নেটিভ পিকারটি তবুও খোলে।
এটি <section rst-box><form rst-form>-এর ভেতরে রাখুন।
<div rst-field >
<label rst-field-label for ="field-datetime_plain" >প্রকাশের তারিখ</label >
<input rst-input id ="field-datetime_plain" name ="field-datetime_plain" type ="datetime-local" value ="2026-09-04T19:30" >
</div >