सामग्री पर जाएँ
अनुभाग
Fiesta

field-daterange

दिनांक और समय datetime.js जिन चार फ़ील्ड को बेहतर बनाता है, हर एक अपने नीचे मूल इनपुट रखता है, ताकि बिना स्क्रिप्ट वाले पाठक को सादा नियंत्रण मिले, टूटा हुआ नहीं।

शुरुआत और अंत, एक ही लेबल वाले fieldset के रूप में। हर इनपुट को उसका अपना name और id दें।

हर उदाहरण असली है, पर उसके लिंक कहीं नहीं ले जाते। HTML कॉपी करने के लिए मार्कअप दिखाता है।

तारीख़ और समय, पहले से भरे हुए

अंत ख़ाली रहते हुए शुरुआत तय कीजिए, और datetime.js अंत को एक घंटे बाद का भर देता है। मार्कअप में कुछ भी ऐसा नहीं करता; यह स्क्रिप्ट करती है।

पूर्वावलोकन

इसे <section rst-box><form rst-form> के अंदर रखें।

<fieldset rst-field-range>
  <legend>कब</legend>
  <div rst-field-row data-rst-range="session">
    <div rst-field>
      <label rst-field-label for="dr_starts_at">शुरू</label>
      <input rst-input id="dr_starts_at" name="dr_starts_at" type="datetime-local" value="2026-09-04T19:30" data-rst-date data-rst-date-words="{&#34;ago&#34;:&#34;पहले&#34;,&#34;am&#34;:&#34;सुबह|पूर्वाह्न|am&#34;,&#34;at&#34;:&#34;बजे|पर&#34;,&#34;day&#34;:&#34;दिन&#34;,&#34;hour&#34;:&#34;घंटा|घंटे&#34;,&#34;in&#34;:&#34;में|बाद&#34;,&#34;last&#34;:&#34;पिछला|पिछले|पिछली&#34;,&#34;midnight&#34;:&#34;मध्यरात्रि|आधी रात&#34;,&#34;minute&#34;:&#34;मिनट&#34;,&#34;month&#34;:&#34;महीना|महीने|माह&#34;,&#34;next&#34;:&#34;अगला|अगले|अगली&#34;,&#34;noon&#34;:&#34;दोपहर&#34;,&#34;pm&#34;:&#34;शाम|अपराह्न|pm|रात&#34;,&#34;today&#34;:&#34;आज&#34;,&#34;tomorrow&#34;:&#34;कल&#34;,&#34;week&#34;:&#34;सप्ताह|हफ़्ता|हफ्ता|हफ़्ते|हफ्ते&#34;,&#34;yesterday&#34;:&#34;बीता कल|गुज़रा कल&#34;}" 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="1 सुझाव" 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>
    <div rst-field>
      <label rst-field-label for="dr_ends_at">समाप्त</label>
      <input rst-input id="dr_ends_at" name="dr_ends_at" type="datetime-local" data-rst-date data-rst-date-words="{&#34;ago&#34;:&#34;पहले&#34;,&#34;am&#34;:&#34;सुबह|पूर्वाह्न|am&#34;,&#34;at&#34;:&#34;बजे|पर&#34;,&#34;day&#34;:&#34;दिन&#34;,&#34;hour&#34;:&#34;घंटा|घंटे&#34;,&#34;in&#34;:&#34;में|बाद&#34;,&#34;last&#34;:&#34;पिछला|पिछले|पिछली&#34;,&#34;midnight&#34;:&#34;मध्यरात्रि|आधी रात&#34;,&#34;minute&#34;:&#34;मिनट&#34;,&#34;month&#34;:&#34;महीना|महीने|माह&#34;,&#34;next&#34;:&#34;अगला|अगले|अगली&#34;,&#34;noon&#34;:&#34;दोपहर&#34;,&#34;pm&#34;:&#34;शाम|अपराह्न|pm|रात&#34;,&#34;today&#34;:&#34;आज&#34;,&#34;tomorrow&#34;:&#34;कल&#34;,&#34;week&#34;:&#34;सप्ताह|हफ़्ता|हफ्ता|हफ़्ते|हफ्ते&#34;,&#34;yesterday&#34;:&#34;बीता कल|गुज़रा कल&#34;}" 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="1 सुझाव" 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>
  </div>
</fieldset>

सिर्फ़ तारीख़ें, अंत वाले हिस्से में त्रुटि के साथ

पूर्वावलोकन

इसे <section rst-box><form rst-form> के अंदर रखें।

<fieldset rst-field-range>
  <legend>बुकिंग</legend>
  <div rst-field-row data-rst-range>
    <div rst-field>
      <label rst-field-label for="dr_from">से</label>
      <input rst-input id="dr_from" name="dr_from" type="date" value="2026-09-04" data-rst-date data-rst-date-words="{&#34;ago&#34;:&#34;पहले&#34;,&#34;am&#34;:&#34;सुबह|पूर्वाह्न|am&#34;,&#34;at&#34;:&#34;बजे|पर&#34;,&#34;day&#34;:&#34;दिन&#34;,&#34;hour&#34;:&#34;घंटा|घंटे&#34;,&#34;in&#34;:&#34;में|बाद&#34;,&#34;last&#34;:&#34;पिछला|पिछले|पिछली&#34;,&#34;midnight&#34;:&#34;मध्यरात्रि|आधी रात&#34;,&#34;minute&#34;:&#34;मिनट&#34;,&#34;month&#34;:&#34;महीना|महीने|माह&#34;,&#34;next&#34;:&#34;अगला|अगले|अगली&#34;,&#34;noon&#34;:&#34;दोपहर&#34;,&#34;pm&#34;:&#34;शाम|अपराह्न|pm|रात&#34;,&#34;today&#34;:&#34;आज&#34;,&#34;tomorrow&#34;:&#34;कल&#34;,&#34;week&#34;:&#34;सप्ताह|हफ़्ता|हफ्ता|हफ़्ते|हफ्ते&#34;,&#34;yesterday&#34;:&#34;बीता कल|गुज़रा कल&#34;}" 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="1 सुझाव" 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>
    <div rst-field>
      <label rst-field-label for="dr_to">तक</label>
      <input rst-input id="dr_to" name="dr_to" type="date" value="2026-09-01" aria-invalid="true" aria-describedby="dr_to-error" data-rst-date data-rst-date-words="{&#34;ago&#34;:&#34;पहले&#34;,&#34;am&#34;:&#34;सुबह|पूर्वाह्न|am&#34;,&#34;at&#34;:&#34;बजे|पर&#34;,&#34;day&#34;:&#34;दिन&#34;,&#34;hour&#34;:&#34;घंटा|घंटे&#34;,&#34;in&#34;:&#34;में|बाद&#34;,&#34;last&#34;:&#34;पिछला|पिछले|पिछली&#34;,&#34;midnight&#34;:&#34;मध्यरात्रि|आधी रात&#34;,&#34;minute&#34;:&#34;मिनट&#34;,&#34;month&#34;:&#34;महीना|महीने|माह&#34;,&#34;next&#34;:&#34;अगला|अगले|अगली&#34;,&#34;noon&#34;:&#34;दोपहर&#34;,&#34;pm&#34;:&#34;शाम|अपराह्न|pm|रात&#34;,&#34;today&#34;:&#34;आज&#34;,&#34;tomorrow&#34;:&#34;कल&#34;,&#34;week&#34;:&#34;सप्ताह|हफ़्ता|हफ्ता|हफ़्ते|हफ्ते&#34;,&#34;yesterday&#34;:&#34;बीता कल|गुज़रा कल&#34;}" 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="1 सुझाव" 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="dr_to-error">समाप्ति शुरुआत से पहले है।</small>
    </div>
  </div>
</fieldset>