Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .size-limit
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
name: "Fundamental-React Size",
webpack: true,
path: "lib/index.js",
limit: "185 KB"
limit: "190 KB"
}
]
47 changes: 14 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@babel/runtime": "^7.8.0",
"chain-function": "^1.0.1",
"classnames": "^2.2.6",
"fundamental-styles": "0.8.0-rc.10",
"fundamental-styles": "0.8.0-rc.16",
"keycode": "^2.2.0",
"moment": "^2.24.0",
"prop-types": "^15.7.1",
Expand Down
19 changes: 19 additions & 0 deletions src/Calendar/Calendar.Component.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
import { Calendar } from '../';
import moment from 'moment';
import path from 'path';
import React from 'react';
import { ComponentPage, Example } from '../_playground';

const tomorrow = moment().add(1, 'day').endOf('day').format('YYYYMMDD');
const nextDay = moment().add(2, 'day').endOf('day').format('YYYYMMDD');
const dayAfter = moment().add(3, 'day').endOf('day').format('YYYYMMDD');
const oneWeek = moment().add(7, 'day').endOf('day').format('YYYYMMDD');

const specialDays = {
[tomorrow]: 1,
[nextDay]: 2,
[dayAfter]: 3,
[oneWeek]: 4
};

export const CalendarComponent = () => {
return (
<ComponentPage
Expand Down Expand Up @@ -33,6 +46,12 @@ export const CalendarComponent = () => {
disableWeekday={['Monday', 'Tuesday']} />
</Example>

<Example
centered
title='Calendar with special days'>
<Calendar specialDays={specialDays} />
</Example>

<Example
centered
title='Calendar with range selection'>
Expand Down
Loading