Fixed date template demo
parent
d6d5c76379
commit
a66e1b7bee
|
@ -66,8 +66,8 @@
|
||||||
<label for="datetemplate">Date Template</label>
|
<label for="datetemplate">Date Template</label>
|
||||||
<Calendar id="datetemplate" v-model="date12">
|
<Calendar id="datetemplate" v-model="date12">
|
||||||
<template #date="slotProps">
|
<template #date="slotProps">
|
||||||
<div v-if="slotProps.date.day > 10 && slotProps.date.day < 15" class="special-day">{{slotProps.date.day}}</div>
|
<strong v-if="slotProps.date.day > 10 && slotProps.date.day < 15" class="special-day">{{slotProps.date.day}}</strong>
|
||||||
<span v-else>{{slotProps.date.day}}</span>
|
<template v-else>{{slotProps.date.day}}</template>
|
||||||
</template>
|
</template>
|
||||||
</Calendar>
|
</Calendar>
|
||||||
</div>
|
</div>
|
||||||
|
@ -150,13 +150,6 @@ export default {
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.special-day {
|
.special-day {
|
||||||
display: flex;
|
text-decoration: line-through;
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
background-color: #1dcbb3;
|
|
||||||
color: #ffffff;
|
|
||||||
border-radius: 50%;
|
|
||||||
width: 2em;
|
|
||||||
height: 2em;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -147,11 +147,17 @@ export default {
|
||||||
<template v-pre>
|
<template v-pre>
|
||||||
<Calendar v-model="value">
|
<Calendar v-model="value">
|
||||||
<template #date="slotProps">
|
<template #date="slotProps">
|
||||||
<div v-if="slotProps.date.day > 10 && slotProps.date.day < 15" class="special-day">{{slotProps.date.day}}</div>
|
<strong v-if="slotProps.date.day > 10 && slotProps.date.day < 15" class="special-day">{{slotProps.date.day}}</strong>
|
||||||
<span v-else>{{slotProps.date.day}}</span>
|
<template v-else>{{slotProps.date.day}}}</template>
|
||||||
</template>
|
</template>
|
||||||
</Calendar>
|
</Calendar>
|
||||||
</template>
|
</template>
|
||||||
|
</CodeHighlight>
|
||||||
|
|
||||||
|
<CodeHighlight lang="css">
|
||||||
|
.special-day {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
</CodeHighlight>
|
</CodeHighlight>
|
||||||
|
|
||||||
<h3>Month Picker</h3>
|
<h3>Month Picker</h3>
|
||||||
|
@ -603,8 +609,8 @@ export default {
|
||||||
<label for="datetemplate">Date Template</label>
|
<label for="datetemplate">Date Template</label>
|
||||||
<Calendar id="datetemplate" v-model="date12">
|
<Calendar id="datetemplate" v-model="date12">
|
||||||
<template #date="slotProps">
|
<template #date="slotProps">
|
||||||
<div v-if="slotProps.date.day > 10 && slotProps.date.day < 15" class="special-day">{{slotProps.date.day}}</div>
|
<strong v-if="slotProps.date.day > 10 && slotProps.date.day < 15" class="special-day">{{slotProps.date.day}}</strong>
|
||||||
<span v-else>{{slotProps.date.day}}</span>
|
<template v-else>{{slotProps.date.day}}}</template>
|
||||||
</template>
|
</template>
|
||||||
</Calendar>
|
</Calendar>
|
||||||
</div>
|
</div>
|
||||||
|
@ -673,11 +679,14 @@ export default {
|
||||||
maxDate: null,
|
maxDate: null,
|
||||||
invalidDates: null
|
invalidDates: null
|
||||||
}
|
}
|
||||||
},
|
|
||||||
components: {
|
|
||||||
'CalendarDoc': CalendarDoc
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
</CodeHighlight>
|
||||||
|
|
||||||
|
<CodeHighlight lang="css">
|
||||||
|
.special-day {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
</CodeHighlight>
|
</CodeHighlight>
|
||||||
|
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
|
Loading…
Reference in New Issue