कुनै पनि वेबसाइट वा वेब एपमा एक लाइन स्क्रिप्ट थपेर तुरुन्तै Bikram Sambat (वि.सं.) क्यालेन्डर पिकर जडान गर्नुहोस्। स्वचालित दुई-तर्फी इसवी संवत् (A.D.) रूपान्तरण, शून्य डिपेन्डेन्सी, र पूर्णतया निःशुल्क।
तलको इनपुटमा क्लिक गरेर वा मिति छानेर हेर्नुहोस्। Gregorian (A.D.) र नेपाली (B.S.) दुबै आफैं सिङ्क हुन्छन्:
यो कोड आफ्नो HTML फाइलको </body> अगाडि पेस्ट गर्नुहोस्। फर्मका सबै <input type="date"> हरूमा आफैं नेपाली क्यालेन्डर थपिनेछ:
<!-- 1. Drop the zero-config script before </body> --> <script src="https://meromiti.com/mero-miti.js" data-mero-miti-auto="true" data-mero-miti-auto-sync="true"> </script> <!-- 2. Standard HTML5 Date Input (Mero Miti automatically attaches a synced companion!) --> <label for="event_date">Select Date:</label> <input type="date" id="event_date" name="event_date" value="2024-09-04" />
event_date (AD) and event_date_bs (BS) to your backend!Mero Miti जुनसुकै प्रविधि, CMS वा फ्रेमवर्कसँग सजिलै काम गर्छ:
Zero-Config Drop-in: Add the script tag to any webpage. Mero Miti uses a high-performance MutationObserver to automatically discover and enhance all <input type="date"> elements, even when loaded dynamically inside modals, AJAX requests, or SPA transitions.
<!-- 1. Drop the zero-config script before </body> --> <script src="https://meromiti.com/mero-miti.js" data-mero-miti-auto="true" data-mero-miti-auto-sync="true"> </script> <!-- 2. Standard HTML5 Date Input (Mero Miti automatically attaches a synced companion!) --> <label for="event_date">Select Date:</label> <input type="date" id="event_date" name="event_date" value="2024-09-04" />
Customize the behavior globally on the <script> tag, or override per-element directly on individual <input> tags:
| Attribute | Target | Options | Default | Description |
|---|---|---|---|---|
| data-mero-miti-auto | <script> | "true" | "false" | "false" | Automatically scans DOM and attaches to all date inputs. |
| data-mero-miti-auto-sync | <script> | "true" | "false" | "true" | Silently pulls newly published official BS years in background from cloud. |
| data-mero-miti-locale | <script> or <input> | "ne" | "en" | "ne" | Nepali calendar with [वि.सं.] badge or English with [B.S.] badge. |
| data-mero-miti-position | <script> or <input> | "right" | "bottom" | "right" | Places the companion beside or directly below the native input. |
| data-mero-miti-format | <script> or <input> | "DD/MM/YYYY" | "YYYY-MM-DD" | "DD/MM/YYYY" | Mask format for the Bikram Sambat date string. |
| data-mero-miti-name | <input> | Custom string | "[input.name]_bs" | Sets the form companion input name for HTTP POST submissions. |
| data-mero-miti="false" | <input> | "false" | "none" | — | Opt-out tag to leave a specific date input as standard HTML5. |