Vue Calendar Week & Month Views

If you want to enable switching between week & month view, you can do it by adding a segmented control to the header and dynamically change the calendarType option. If you are not looking for dynamic switching you can configure a week calendar or a month calendar.

Get started with this example

Demo

<script setup>
const myCalendarType = ref('week')
</script>

<template>
  <MbscDatepicker :controls="['calendar']" :calendarType="myCalendarType" :calendarSize="1">
    <template #header>
      <MbscCalendarNav class="custom-view-nav" />
      <div class="custom-view">
        <MbscSegmentedGroup v-model="myCalendarType">
          <MbscSegmented value="week" icon="material-date-range"></MbscSegmented>
          <MbscSegmented value="month" icon="material-event-note"></MbscSegmented>
        </MbscSegmentedGroup>
      </div>
      <MbscCalendarPrev />
      <MbscCalendarNext />
    </template>
  </MbscDatepicker>
</template>
<style>
.custom-view {
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-flex: 1 0 auto;
  -moz-box-flex: 1;
  -ms-flex: 1 0 auto;
  flex: 1 0 auto;
  -webkit-justify-content: center;
  -moz-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;                 

  .mbsc-segmented {
    margin: 0;
  }

  .mbsc-segmented.mbsc-material,
  .mbsc-segmented.mbsc-windows {
    padding: 0 2px;
  }

  .mbsc-segmented .mbsc-segmented-button {
    padding: 0 1px;
  }

  .mbsc-segmented .mbsc-icon {
    font-size: 20px;
  }

  .mbsc-segmented-button.mbsc-windows {
    border: 0;
  }
}

.custom-view-nav .mbsc-calendar-title.mbsc-material {
  font-size: 16px;
}
</style>

Duplicate Session

You have signed in on a different machine. To keep everything in sync, you have been signed out of this session.

If you need to invite team members, manage seats and accounts you can do it from the licenses page.

Duplicate Session

We noticed you are logged in on a different machine and have closed your old session.

If you need to invite team members, manage seats and accounts you can do it from the licenses page.