Files
hedena_gold/apps/admin-panel/dist/assets/DateInput-COU3oLhL.js
T
s.esmaeiliandCursor d316d15335 Commit admin and user-app release builds after order and panel polish.
Includes the Dashboard CSS comment fix needed for the admin production build.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 23:40:39 +03:30

2 lines
1.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{m}from"./index-DT4Uze1z.js";import{d as _,l as V,o as r,c as Y,w as h,p as D,a as j,t as M,f as b,k as d,g as k,r as i,_ as x}from"./index-QQcP5-AC.js";const y={key:0,class:"hint"},g=_({__name:"DateInput",props:{label:{},modelValue:{},placeholder:{default:"مثال: ۱۴۰۳/۰۵/۱۲"}},emits:["update:modelValue"],setup(o,{emit:p}){const n=o,c=p,t=d(void 0),a=d(""),f=k(()=>{if(t.value!==void 0)return t.value;if(!n.modelValue)return"";const e=m(n.modelValue);return e.isValid()?e.format("jYYYY/jMM/jDD"):""});V(()=>n.modelValue,()=>{t.value=void 0});function v(e){if(t.value=e,!e){a.value="",c("update:modelValue",void 0);return}const u=e.replace(/[۰-۹]/g,s=>String("۰۱۲۳۴۵۶۷۸۹".indexOf(s))),l=m(u,"jYYYY/jMM/jDD");l.isValid()?(a.value="",c("update:modelValue",l.format("YYYY-MM-DD"))):a.value="تاریخ معتبر نیست"}return(e,u)=>{const l=i("a-input"),s=i("a-form-item");return r(),Y(s,{label:o.label},{default:h(()=>[D(l,{value:f.value,placeholder:o.placeholder,"allow-clear":"","onUpdate:value":v},null,8,["value","placeholder"]),a.value?(r(),j("small",y,M(a.value),1)):b("",!0)]),_:1},8,["label"])}}}),I=x(g,[["__scopeId","data-v-3863c3bc"]]);export{I as D};