Updated calendar demo
parent
c5bf7bf0c0
commit
699a48f502
|
@ -7,72 +7,73 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content-section implementation" style="padding-top:0">
|
||||
<div class="p-grid p-fluid">
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Basic</h3>
|
||||
<Calendar v-model="date1" />
|
||||
<div class="content-section implementation">
|
||||
<h3>Popup</h3>
|
||||
<div class=" p-fluid p-grid p-formgrid">
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="basic">Basic</label>
|
||||
<Calendar id="basic" v-model="date1" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Spanish</h3>
|
||||
<Calendar v-model="date2" :locale="es" dateFormat="dd/mm/yy" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="icon">Icon</label>
|
||||
<Calendar id="icon" v-model="date3" :showIcon="true" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Icon</h3>
|
||||
<Calendar v-model="date3" :showIcon="true" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="spanish">Spanish</label>
|
||||
<Calendar id="spanish" v-model="date2" :locale="es" dateFormat="dd/mm/yy" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Min-Max</h3>
|
||||
<Calendar v-model="date4" :minDate="minDate" :maxDate="maxDate" :manualInput="false" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="minmax">MinMax</label>
|
||||
<Calendar id="minmax" v-model="date4" :minDate="minDate" :maxDate="maxDate" :manualInput="false" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Disable Days</h3>
|
||||
<Calendar v-model="date5" :disabledDates="invalidDates" :disabledDays="[0,6]" :manualInput="false" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="disableddays">Disabled Days</label>
|
||||
<Calendar id="disableddays" v-model="date5" :disabledDates="invalidDates" :disabledDays="[0,6]" :manualInput="false" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Navigators</h3>
|
||||
<Calendar v-model="date6" :monthNavigator="true" :yearNavigator="true" yearRange="2000:2030" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="navigators">Navigators</label>
|
||||
<Calendar id="navigators" v-model="date6" :monthNavigator="true" :yearNavigator="true" yearRange="2000:2030" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Multiple</h3>
|
||||
<Calendar v-model="dates1" selectionMode="multiple" :manualInput="false" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="multiple">Multiple</label>
|
||||
<Calendar id="multiple" v-model="dates1" selectionMode="multiple" :manualInput="false" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Range</h3>
|
||||
<Calendar v-model="dates2" selectionMode="range" :manualInput="false" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="range">Range</label>
|
||||
<Calendar id="range" v-model="dates2" selectionMode="range" :manualInput="false" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Button Bar</h3>
|
||||
<Calendar v-model="date7" :showButtonBar="true" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="buttonbar">Button Bar</label>
|
||||
<Calendar id="buttonbar" v-model="date7" :showButtonBar="true" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Time / 24h</h3>
|
||||
<Calendar v-model="date8" :showTime="true" :showSeconds="true" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="time24">Time / 24h</label>
|
||||
<Calendar id="time24" v-model="date8" :showTime="true" :showSeconds="true" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Time Only / 12h</h3>
|
||||
<Calendar v-model="date9" :timeOnly="true" hourFormat="12" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="time12">Time / 12h</label>
|
||||
<Calendar id="time12" v-model="date9" :timeOnly="true" hourFormat="12" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Month/Year Picker</h3>
|
||||
<Calendar v-model="date10" view="month" dateFormat="mm/yy" :yearNavigator="true" yearRange="2000:2030" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="monthpicker">Month Picker</label>
|
||||
<Calendar id="monthpicker" v-model="date10" view="month" dateFormat="mm/yy" :yearNavigator="true" yearRange="2000:2030" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Multiple Months</h3>
|
||||
<Calendar v-model="date11" :numberOfMonths="3" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="multiplemonths">Multiple Months</label>
|
||||
<Calendar id="multiplemonths" v-model="date11" :numberOfMonths="3" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Date Template</h3>
|
||||
<Calendar v-model="date12">
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="datetemplate">Date Template</label>
|
||||
<Calendar id="datetemplate" v-model="date12">
|
||||
<template #date="slotProps">
|
||||
<div v-if="slotProps.date.day > 10 && slotProps.date.day < 15" class="special-day">{{slotProps.date.day}}</div>
|
||||
<span v-else>{{slotProps.date.day}}</span>
|
||||
</template>
|
||||
</Calendar>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Touch UI</h3>
|
||||
<Calendar v-model="date13" :touchUI="true" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="touchUI">TouchUI</label>
|
||||
<Calendar id="touchUI" v-model="date13" :touchUI="true" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -545,71 +545,72 @@ export default {
|
|||
</a>
|
||||
<CodeHighlight>
|
||||
<template v-pre>
|
||||
<div class="p-grid p-fluid">
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Basic</h3>
|
||||
<Calendar v-model="date1" />
|
||||
<h3>Popup</h3>
|
||||
<div class=" p-fluid p-grid p-formgrid">
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="basic">Basic</label>
|
||||
<Calendar id="basic" v-model="date1" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Spanish</h3>
|
||||
<Calendar v-model="date2" :locale="es" dateFormat="dd/mm/yy" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="icon">Icon</label>
|
||||
<Calendar id="icon" v-model="date3" :showIcon="true" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Icon</h3>
|
||||
<Calendar v-model="date3" :showIcon="true" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="spanish">Spanish</label>
|
||||
<Calendar id="spanish" v-model="date2" :locale="es" dateFormat="dd/mm/yy" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Min-Max</h3>
|
||||
<Calendar v-model="date4" :minDate="minDate" :maxDate="maxDate" :manualInput="false" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="minmax">MinMax</label>
|
||||
<Calendar id="minmax" v-model="date4" :minDate="minDate" :maxDate="maxDate" :manualInput="false" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Disable Days</h3>
|
||||
<Calendar v-model="date5" :disabledDates="invalidDates" :disabledDays="[0,6]" :manualInput="false" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="disableddays">Disabled Days</label>
|
||||
<Calendar id="disableddays" v-model="date5" :disabledDates="invalidDates" :disabledDays="[0,6]" :manualInput="false" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Navigators</h3>
|
||||
<Calendar v-model="date6" :monthNavigator="true" :yearNavigator="true" yearRange="2000:2030" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="navigators">Navigators</label>
|
||||
<Calendar id="navigators" v-model="date6" :monthNavigator="true" :yearNavigator="true" yearRange="2000:2030" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Multiple</h3>
|
||||
<Calendar v-model="dates1" selectionMode="multiple" :manualInput="false" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="multiple">Multiple</label>
|
||||
<Calendar id="multiple" v-model="dates1" selectionMode="multiple" :manualInput="false" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Range</h3>
|
||||
<Calendar v-model="dates2" selectionMode="range" :manualInput="false" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="range">Range</label>
|
||||
<Calendar id="range" v-model="dates2" selectionMode="range" :manualInput="false" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Button Bar</h3>
|
||||
<Calendar v-model="date7" :showButtonBar="true" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="buttonbar">Button Bar</label>
|
||||
<Calendar id="buttonbar" v-model="date7" :showButtonBar="true" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Time / 24h</h3>
|
||||
<Calendar v-model="date8" :showTime="true" :showSeconds="true" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="time24">Time / 24h</label>
|
||||
<Calendar id="time24" v-model="date8" :showTime="true" :showSeconds="true" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Time Only / 12h</h3>
|
||||
<Calendar v-model="date9" :timeOnly="true" hourFormat="12" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="time12">Time / 12h</label>
|
||||
<Calendar id="time12" v-model="date9" :timeOnly="true" hourFormat="12" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Month/Year Picker</h3>
|
||||
<Calendar v-model="date10" view="month" dateFormat="mm/yy" :yearNavigator="true" yearRange="2000:2030" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="monthpicker">Month Picker</label>
|
||||
<Calendar id="monthpicker" v-model="date10" view="month" dateFormat="mm/yy" :yearNavigator="true" yearRange="2000:2030" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Multiple Months</h3>
|
||||
<Calendar v-model="date11" :numberOfMonths="3" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="multiplemonths">Multiple Months</label>
|
||||
<Calendar id="multiplemonths" v-model="date11" :numberOfMonths="3" />
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Date Template</h3>
|
||||
<Calendar v-model="date12">
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="datetemplate">Date Template</label>
|
||||
<Calendar id="datetemplate" v-model="date12">
|
||||
<template #date="slotProps">
|
||||
<div v-if="slotProps.date.day > 10 && slotProps.date.day < 15" class="special-day">{{slotProps.date.day}}</div>
|
||||
<div v-if="slotProps.date.day > 10 && slotProps.date.day < 15" class="special-day">{{slotProps.date.day}}</div>
|
||||
<span v-else>{{slotProps.date.day}}</span>
|
||||
</template>
|
||||
</Calendar>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-4">
|
||||
<h3>Touch UI</h3>
|
||||
<Calendar v-model="date13" :touchUI="true" />
|
||||
<div class="p-field p-col-12 p-md-4">
|
||||
<label for="touchUI">TouchUI</label>
|
||||
<Calendar id="touchUI" v-model="date13" :touchUI="true" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue