Closed jsfather closed 3 years ago
سلام آقا علیرضا دم شما گرم کار کرد و کارمو قشنگ راه انداخت. امیدوارم همیشه موفق و پیروز باشید. ممنونم از شما
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10
From: @.> Sent: Sunday, May 9, 2021 11:59 AM To: @.> Cc: Keyvan @.>; @.> Subject: Re: [talkhabi/vue-persian-datetime-picker] وقتی از Custom Input استفاده میشه display-format کار نمیکنه (#149)
با این روش میشه <date-picker ref="datePicker" type="date" vmodel="selectedDate" element="fromtime" format="YYYY-MM-DD" display-format="jYYYY/jMM/jDD" @change="selectDate"/>
data() { return { displaySelectedDate: '', selectedDate: '' } }
methods: { selectDate() { this.displaySelectedDate = this.$refs.datePicker.displayValue }, }
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/talkhabi/vue-persian-datetime-picker/issues/149#issuecomment-835726068, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHQEE3QDFIAFRSIB5QKWWWTTMY2ULANCNFSM4ZE5R7LA.
<input is="flat-pickr" class="form-control item-datestart select" type="datetime-local" tabindex="1"
name="<?= $enc->attr( $this->formparam( array( 'item', 'product.datestart' ) ) ) ?>"
placeholder="<?= $enc->attr( $this->translate( 'admin', 'YYYY-MM-DD hh:mm:ss (optional)' ) ) ?>"
v-bind:value="`<?= $enc->js( $this->datetime( $this->get( 'itemData/product.datestart' ) ) ) ?>`"
v-bind:disabled="`<?= $enc->js( $this->site()->readonly( $this->get( 'itemData/product.siteid' ) ) ) ?>` !== ''"
v-bind:config="Aimeos.flatpickr.datetime" />
Vue.use(VuePersianDatetimePicker, {
name: 'flat-pickr',
props: {
inputFormat: "YYYY-MM-DD",
format: "YYYY/MM/DD",
clearable: true,
editable: false,
color: 'var(--bs-primary, #30a0e0)',
autoSubmit: false,
}
});
با این روش میشه
<date-picker ref="datePicker" type="date" vmodel="selectedDate" element="fromtime" format="YYYY-MM-DD" display-format="jYYYY/jMM/jDD" @change="selectDate"/>
<input v-model="displaySelectedDate" id="from-time" >
data() { return { displaySelectedDate: '', selectedDate: '' } }
methods: { selectDate() { this.displaySelectedDate = this.$refs.datePicker.displayValue }, }