DaySpan
A date & schedule library to use for advanced calendars in TypeScript and JS.
- Google Calendar Clone checkout dayspan-vuetify
- Documentation
- Download JS
- Install via
bower install dayspan
ornpm install dayspan
Features
- Schedules track how frequent events occur using 20+ properties
- Events can last minutes, hours, days, or weeks
- Events can occur all day, or 1 or more times during the day
- Events can have any day & time included as an event occurrence (they don't need to match the frequency of the schedule)
- Events can be excluded, cancelled, or have metadata (specific event occurrence, all in a given day, week, month, quarter, or year)
- Event occurrences can be moved
- Calendars can represent a span of days, weeks, months, or years
- Easily list the next/previous days that occur on a schedule
- Describe a schedule in a human friendly string
- Export and import schedules and calendars to plain objects for easy saving and loading
- Provides logic to help display intersecting events on a calendar
TypeScript Example
// A monthly calendar around today (string=event data type, any=schedule metadata type); // Every Monday 9:00 - 9:30cal.addEvent; // Dr. Appointment on 01/04/2018cal.addEvent; // Mother's Daycal.addEvent; // The array of days in the month, each day has a list of the days events.cal.days; // Go to the next monthcal.next; // Select this day and update the selection flags in the calendar dayscal.selectDay.build2018, Month.APRIL, 12; // Remove the schedulecal.removeEvent'Weekly Meeting'; // A weekly calendar with custom MyEvent classCalendar.weeks; // A daily calendar covering 3 days centered on todayCalendar.days3; // A daily calendar covering 3 days starting with given dateCalendar.days3, Day.build2018, Month.JUNE, 15, 0;
JS Example
You just need to append ds
to the beginning of the classes:
// A monthly calendar around todayvar cal = dsCalendar; // Every Monday 9:00 - 9:30cal; // Dr. Appointment on 01/04/2018cal;