import{d as i,A as n,J as u,_ as f,P as m,O as p,B as _,j as b,aK as v,H as y,c as r,g as d}from"./index-DOFLUERq.js";import{_ as g}from"./_plugin-vue_export-helper-DlAUqK2U.js";const N={class:"field-label"},x={key:0,class:"required"},D=i({__name:"Datetime",props:{df:{},record:{},canEdit:{type:Boolean},ctx:{}},setup(a){const t=a,s=r(()=>t.df.label_layout||"vertical"),o=r({get(){const e=t.record[t.df.fieldname];if(!e)return null;if(typeof e=="number")return e;const l=new Date(e).getTime();return isNaN(l)?null:l},set(e){e===null?t.record[t.df.fieldname]=null:t.record[t.df.fieldname]=new Date(e).toISOString().replace("T"," ").substring(0,23)}});return(e,l)=>(d(),n("div",{class:y(["field-wrapper",`layout-${s.value}`])},[u("label",N,[f(m(a.ctx.t(a.df.label||a.df.fieldname))+" ",1),a.df.reqd?(d(),n("span",x,"*")):p("",!0)]),_(b(v),{value:o.value,"onUpdate:value":l[0]||(l[0]=c=>o.value=c),type:"datetime",placeholder:"",disabled:!a.canEdit},null,8,["value","disabled"])],2))}}),B=g(D,[["__scopeId","data-v-3dbae858"]]),O=Object.freeze(Object.defineProperty({__proto__:null,default:B},Symbol.toStringTag,{value:"Module"}));export{O as _};
