Date selection
The date picker ships with five built-in variations for rendering the UI. The controls option supports the following:
date- renders a date-only scroller or dropdown controltime- renders a time-only scroller or dropdown controltimegrid- renders a time grid for time selectiondatetime- renders a date & time scroller or dropdowncalendar- renders a calendar view for date picking
When passing controls: ['date'], the date picker will render a date-only picker - scroller for touchUi: true and a dropdown for touchUi: false.
You can further customize the dateFormat and dateWheels to fine-tune the UX... use it as a credit card expiration picker.
Demo
<MbscDatepicker
:controls="['date ']"
:touchUi=" "
/>
<MbscDatepicker
:controls="['date ']"
:touchUi=" "
dateFormat="MM/YYYY"
dateWheels="|MMMM YYYY|"
/>
<script setup>
import { MbscDatepicker, MbscPage, setOptions } from '@mobiscroll/vue'
setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
})
</script>
<template>
<MbscPage>
<MbscDatepicker
:controls="['date']"
label="Date picker"
inputStyle="outline"
labelStyle="stacked"
placeholder="Please Select..."
/>
<MbscDatepicker
:controls="['date']"
dateFormat="MM/YYYY"
dateWheels="MMMM YYYY"
label="Month & year picker"
inputStyle="outline"
labelStyle="stacked"
placeholder="Please Select..."
/>
</MbscPage>
</template>
<script setup lang="ts">
import { MbscDatepicker, MbscPage, setOptions } from '@mobiscroll/vue'
setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
})
</script>
<template>
<MbscPage>
<MbscDatepicker
:controls="['date']"
label="Date picker"
inputStyle="outline"
labelStyle="stacked"
placeholder="Please Select..."
/>
<MbscDatepicker
:controls="['date']"
dateFormat="MM/YYYY"
dateWheels="MMMM YYYY"
label="Month & year picker"
inputStyle="outline"
labelStyle="stacked"
placeholder="Please Select..."
/>
</MbscPage>
</template>