How to use the bpk-component-calendar.DateUtils.addDays function in bpk-component-calendar

To help you get started, we’ve selected a few bpk-component-calendar examples, based on popular ways it is used in public projects.

github Skyscanner / backpack / packages / bpk-component-scrollable-calendar / stories.js View on Github external
.add('BpkScrollableCalendarGridList', () => (
    <BpkScrollableCalendarGridList
      month={new Date()}
      weekStartsOn={1}
      daysOfWeek={weekDays}
      onDateClick={action('Clicked day')}
      formatMonth={formatMonth}
      formatDateFull={formatDateFull}
      DateComponent={BpkScrollableCalendarDate}
      showWeekendSeparator
      selectTodaysDate
      minDate={DateUtils.addDays(new Date(), -1)}
      maxDate={DateUtils.addMonths(new Date(), 12)}
    />
  ))
  .add("Scrollable Calendar - Don't show weekend separator", () => (
github Skyscanner / backpack / packages / bpk-docs / src / pages / WebScrollableCalendarPage / WebScrollableCalendarPage.js View on Github external
};

const components = [
  {
    id: 'default',
    title: 'Default',
    examples: [
      <ScrollableCal
        id="myCalendar"
        formatMonth={formatMonth}
        formatDateFull={formatDateFull}
        daysOfWeek={weekDays}
        weekStartsOn={1}
        markToday={false}
        selectTodaysDate
        minDate={DateUtils.addDays(new Date(), -1)}
        maxDate={DateUtils.addMonths(new Date(), 12)}
      />,
    ],
  },
  {
    id: 'localised',
    title: 'Localised scrollable calendar',
    examples: [
      <ScrollableCal
        id="myCalendar"
        formatMonth={formatMonthArabic}
        formatDateFull={formatDateFullArabic}
        daysOfWeek={weekDaysArabic}
        weekStartsOn={1}
        markToday={false}
        selectTodaysDate