|
@@ -25,7 +25,7 @@ L'unité de base du DatePicker est le jour.
|
|
|
v-model="value2"
|
|
|
type="date"
|
|
|
placeholder="Choississez un jour"
|
|
|
- :picker-options="pickerOptions1">
|
|
|
+ :picker-options="pickerOptions">
|
|
|
</el-date-picker>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -34,7 +34,7 @@ L'unité de base du DatePicker est le jour.
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- pickerOptions1: {
|
|
|
+ pickerOptions: {
|
|
|
disabledDate(time) {
|
|
|
return time.getTime() > Date.now();
|
|
|
},
|
|
@@ -79,7 +79,7 @@ Vous pouvez sélectionner une semaine, un mois, une année ou plusieurs dates en
|
|
|
<div class="block">
|
|
|
<span class="demonstration">Semaine</span>
|
|
|
<el-date-picker
|
|
|
- v-model="value3"
|
|
|
+ v-model="value1"
|
|
|
type="week"
|
|
|
format="Week WW"
|
|
|
placeholder="Sélectionnez une semaine">
|
|
@@ -88,7 +88,7 @@ Vous pouvez sélectionner une semaine, un mois, une année ou plusieurs dates en
|
|
|
<div class="block">
|
|
|
<span class="demonstration">Mois</span>
|
|
|
<el-date-picker
|
|
|
- v-model="value4"
|
|
|
+ v-model="value2"
|
|
|
type="month"
|
|
|
placeholder="Sélectionnez un mois">
|
|
|
</el-date-picker>
|
|
@@ -98,7 +98,7 @@ Vous pouvez sélectionner une semaine, un mois, une année ou plusieurs dates en
|
|
|
<div class="block">
|
|
|
<span class="demonstration">Année</span>
|
|
|
<el-date-picker
|
|
|
- v-model="value5"
|
|
|
+ v-model="value3"
|
|
|
type="year"
|
|
|
placeholder="Sélectionnez une année">
|
|
|
</el-date-picker>
|
|
@@ -107,7 +107,7 @@ Vous pouvez sélectionner une semaine, un mois, une année ou plusieurs dates en
|
|
|
<span class="demonstration">Dates</span>
|
|
|
<el-date-picker
|
|
|
type="dates"
|
|
|
- v-model="value14"
|
|
|
+ v-model="value4"
|
|
|
placeholder="Sélectionnez une ou plusieurs dates">
|
|
|
</el-date-picker>
|
|
|
</div>
|
|
@@ -117,10 +117,10 @@ Vous pouvez sélectionner une semaine, un mois, une année ou plusieurs dates en
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ value1: '',
|
|
|
+ value2: '',
|
|
|
value3: '',
|
|
|
- value4: '',
|
|
|
- value5: '',
|
|
|
- value14: ''
|
|
|
+ value4: ''
|
|
|
};
|
|
|
}
|
|
|
};
|
|
@@ -140,7 +140,7 @@ Vous pouvez sélectionner une plage de dates.
|
|
|
<div class="block">
|
|
|
<span class="demonstration">Défaut</span>
|
|
|
<el-date-picker
|
|
|
- v-model="value6"
|
|
|
+ v-model="value1"
|
|
|
type="daterange"
|
|
|
range-separator="à"
|
|
|
start-placeholder="Date de début"
|
|
@@ -150,14 +150,14 @@ Vous pouvez sélectionner une plage de dates.
|
|
|
<div class="block">
|
|
|
<span class="demonstration">Avec raccourcis</span>
|
|
|
<el-date-picker
|
|
|
- v-model="value7"
|
|
|
+ v-model="value2"
|
|
|
type="daterange"
|
|
|
align="right"
|
|
|
unlink-panels
|
|
|
range-separator="à"
|
|
|
start-placeholder="Date de début"
|
|
|
end-placeholder="Date de fin"
|
|
|
- :picker-options="pickerOptions2">
|
|
|
+ :picker-options="pickerOptions">
|
|
|
</el-date-picker>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -166,7 +166,7 @@ Vous pouvez sélectionner une plage de dates.
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- pickerOptions2: {
|
|
|
+ pickerOptions: {
|
|
|
shortcuts: [{
|
|
|
text: 'Semaine dernière',
|
|
|
onClick(picker) {
|
|
@@ -193,8 +193,8 @@ Vous pouvez sélectionner une plage de dates.
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
- value6: '',
|
|
|
- value7: ''
|
|
|
+ value1: '',
|
|
|
+ value2: ''
|
|
|
};
|
|
|
}
|
|
|
};
|
|
@@ -213,7 +213,7 @@ Picking a month range is supported.
|
|
|
<div class="block">
|
|
|
<span class="demonstration">Default</span>
|
|
|
<el-date-picker
|
|
|
- v-model="value15"
|
|
|
+ v-model="value1"
|
|
|
type="monthrange"
|
|
|
range-separator="To"
|
|
|
start-placeholder="Start month"
|
|
@@ -223,14 +223,14 @@ Picking a month range is supported.
|
|
|
<div class="block">
|
|
|
<span class="demonstration">With quick options</span>
|
|
|
<el-date-picker
|
|
|
- v-model="value16"
|
|
|
+ v-model="value2"
|
|
|
type="monthrange"
|
|
|
align="right"
|
|
|
unlink-panels
|
|
|
range-separator="To"
|
|
|
start-placeholder="Start month"
|
|
|
end-placeholder="End month"
|
|
|
- :picker-options="pickerOptions3">
|
|
|
+ :picker-options="pickerOptions">
|
|
|
</el-date-picker>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -239,7 +239,7 @@ Picking a month range is supported.
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- pickerOptions3: {
|
|
|
+ pickerOptions: {
|
|
|
shortcuts: [{
|
|
|
text: 'This month',
|
|
|
onClick(picker) {
|
|
@@ -262,8 +262,8 @@ Picking a month range is supported.
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
- value15: '',
|
|
|
- value16: ''
|
|
|
+ value1: '',
|
|
|
+ value2: ''
|
|
|
};
|
|
|
}
|
|
|
};
|
|
@@ -283,7 +283,7 @@ Si le type est `daterange`, `default-value` configure la panneau de gauche.
|
|
|
<div class="block">
|
|
|
<span class="demonstration">Date</span>
|
|
|
<el-date-picker
|
|
|
- v-model="value8"
|
|
|
+ v-model="value1"
|
|
|
type="date"
|
|
|
placeholder="Sélectionnez une date"
|
|
|
default-value="2010-10-01">
|
|
@@ -292,7 +292,7 @@ Si le type est `daterange`, `default-value` configure la panneau de gauche.
|
|
|
<div class="block">
|
|
|
<span class="demonstration">Plage de dates</span>
|
|
|
<el-date-picker
|
|
|
- v-model="value9"
|
|
|
+ v-model="value2"
|
|
|
type="daterange"
|
|
|
align="right"
|
|
|
start-placeholder="Date de début"
|
|
@@ -306,8 +306,8 @@ Si le type est `daterange`, `default-value` configure la panneau de gauche.
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- value8: '',
|
|
|
- value9: ''
|
|
|
+ value1: '',
|
|
|
+ value2: ''
|
|
|
};
|
|
|
}
|
|
|
};
|
|
@@ -353,9 +353,9 @@ Attention à la capitalisation !
|
|
|
<template>
|
|
|
<div class="block">
|
|
|
<span class="demonstration">Émet un objet Date</span>
|
|
|
- <div class="demonstration">Value: {{ value10 }}</div>
|
|
|
+ <div class="demonstration">Value: {{ value1 }}</div>
|
|
|
<el-date-picker
|
|
|
- v-model="value10"
|
|
|
+ v-model="value1"
|
|
|
type="date"
|
|
|
placeholder="Sélectionnez une date"
|
|
|
format="yyyy/MM/dd">
|
|
@@ -363,9 +363,9 @@ Attention à la capitalisation !
|
|
|
</div>
|
|
|
<div class="block">
|
|
|
<span class="demonstration">Utilise value-format</span>
|
|
|
- <div class="demonstration">Value: {{ value11 }}</div>
|
|
|
+ <div class="demonstration">Value: {{ value2 }}</div>
|
|
|
<el-date-picker
|
|
|
- v-model="value11"
|
|
|
+ v-model="value2"
|
|
|
type="date"
|
|
|
placeholder="Sélectionnez une date"
|
|
|
format="yyyy/MM/dd"
|
|
@@ -374,9 +374,9 @@ Attention à la capitalisation !
|
|
|
</div>
|
|
|
<div class="block">
|
|
|
<span class="demonstration">Timestamp</span>
|
|
|
- <div class="demonstration">Value:{{ value12 }}</div>
|
|
|
+ <div class="demonstration">Value:{{ value3 }}</div>
|
|
|
<el-date-picker
|
|
|
- v-model="value12"
|
|
|
+ v-model="value3"
|
|
|
type="date"
|
|
|
placeholder="Sélectionnez une date"
|
|
|
format="yyyy/MM/dd"
|
|
@@ -389,9 +389,9 @@ Attention à la capitalisation !
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- value10: '',
|
|
|
- value11: '',
|
|
|
- value12: ''
|
|
|
+ value1: '',
|
|
|
+ value2: '',
|
|
|
+ value3: ''
|
|
|
};
|
|
|
}
|
|
|
};
|
|
@@ -407,9 +407,9 @@ Lorsque vous choisissez une plage de dates, vous pouvez assigner l'horaire de d
|
|
|
```html
|
|
|
<template>
|
|
|
<div class="block">
|
|
|
- <p>Valeur: {{ value13 }}</p>
|
|
|
+ <p>Valeur: {{ value }}</p>
|
|
|
<el-date-picker
|
|
|
- v-model="value13"
|
|
|
+ v-model="value"
|
|
|
type="daterange"
|
|
|
start-placeholder="Date de début"
|
|
|
end-placeholder="Date de fin"
|
|
@@ -422,7 +422,7 @@ Lorsque vous choisissez une plage de dates, vous pouvez assigner l'horaire de d
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- value13: ''
|
|
|
+ value: ''
|
|
|
};
|
|
|
}
|
|
|
};
|