Search code examples
xmlcalendarnativescripttelerik-appbuildernativescript-telerik-ui

Date Picker with multiple dates selection


I am working on Nativescript application where i have need for From date to To date (Range of date). I tried to implement RadCalendar but i could not find method or attribute for multiple dates selection OR dates range selection.

Below is my XML code for calander view

<Page xmlns="http://www.nativescript.org/tns.xsd" 
  xmlns:calendar="nativescript-telerik-ui-pro/calendar"
  showingModally="onLoaded">
    <StackLayout id="calendarModal" width="90%" height="65%" horizontalAlignment="center" verticalAlignment="center" backgroundColor="white" opacity="1">
        <StackLayout class="popup-wrapper">
            <calendar:RadCalendar id="calendar" dateSelected="onDateSelected" />
        </StackLayout>
    </StackLayout>
</Page>

Thanks.


Solution

  • I have used selectionMode attribute. Reference

    Other available options are

    1. Multiple
    2. None
    3. Range
    4. Single

    XML

    <calendar:RadCalendar id="calendar" dateSelected="onDateSelected" selectionMode="Range" />