-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
237 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
|
||
export const EXAMPLE_CAL_RANGE = [ | ||
{ numberedDay: 26 }, | ||
{ numberedDay: 27 }, | ||
{ numberedDay: 28 }, | ||
{ numberedDay: 29 }, | ||
{ numberedDay: 30 }, | ||
{ numberedDay: 1, isInTheCurrentMonth: true }, | ||
{ numberedDay: 2, isInTheCurrentMonth: true }, | ||
{ numberedDay: 3, isInTheCurrentMonth: true }, | ||
{ numberedDay: 4, isInTheCurrentMonth: true }, | ||
{ numberedDay: 5, isInTheCurrentMonth: true }, | ||
{ numberedDay: 6, isInTheCurrentMonth: true }, | ||
{ numberedDay: 7, isInTheCurrentMonth: true, isToday: true }, | ||
{ numberedDay: 8, isInTheCurrentMonth: true, isSelected: true, isStartDate: true }, | ||
{ numberedDay: 9, isInTheCurrentMonth: true, isSelected: true }, | ||
{ numberedDay: 10, isInTheCurrentMonth: true, isSelected: true }, | ||
{ numberedDay: 11, isInTheCurrentMonth: true, isSelected: true }, | ||
{ numberedDay: 12, isInTheCurrentMonth: true, isSelected: true }, | ||
{ numberedDay: 13, isInTheCurrentMonth: true, isSelected: true }, | ||
{ numberedDay: 14, isInTheCurrentMonth: true, isSelected: true, isEndDate: true }, | ||
{ numberedDay: 15, isInTheCurrentMonth: true }, | ||
{ numberedDay: 16, isInTheCurrentMonth: true }, | ||
{ numberedDay: 17, isInTheCurrentMonth: true }, | ||
{ numberedDay: 18, isInTheCurrentMonth: true }, | ||
{ numberedDay: 19, isInTheCurrentMonth: true }, | ||
{ numberedDay: 20, isInTheCurrentMonth: true }, | ||
{ numberedDay: 21, isInTheCurrentMonth: true }, | ||
{ numberedDay: 22, isInTheCurrentMonth: true }, | ||
{ numberedDay: 23, isInTheCurrentMonth: true }, | ||
{ numberedDay: 24, isInTheCurrentMonth: true }, | ||
{ numberedDay: 25, isInTheCurrentMonth: true }, | ||
{ numberedDay: 26, isInTheCurrentMonth: true }, | ||
{ numberedDay: 27, isInTheCurrentMonth: true }, | ||
{ numberedDay: 28, isInTheCurrentMonth: true }, | ||
{ numberedDay: 29, isInTheCurrentMonth: true }, | ||
{ numberedDay: 30, isInTheCurrentMonth: true }, | ||
{ numberedDay: 31, isInTheCurrentMonth: true }, | ||
{ numberedDay: 1 }, | ||
{ numberedDay: 2 }, | ||
{ numberedDay: 3 }, | ||
{ numberedDay: 4 }, | ||
{ numberedDay: 5 }, | ||
{ numberedDay: 6 }, | ||
]; | ||
|
||
export const EXAMPLE_CAL_SINGLE_DATE = [ | ||
{ numberedDay: 26 }, | ||
{ numberedDay: 27 }, | ||
{ numberedDay: 28 }, | ||
{ numberedDay: 29 }, | ||
{ numberedDay: 30 }, | ||
{ numberedDay: 1, isInTheCurrentMonth: true }, | ||
{ numberedDay: 2, isInTheCurrentMonth: true }, | ||
{ numberedDay: 3, isInTheCurrentMonth: true }, | ||
{ numberedDay: 4, isInTheCurrentMonth: true }, | ||
{ numberedDay: 5, isInTheCurrentMonth: true }, | ||
{ numberedDay: 6, isInTheCurrentMonth: true }, | ||
{ numberedDay: 7, isInTheCurrentMonth: true, isToday: true }, | ||
{ numberedDay: 8, isInTheCurrentMonth: true }, | ||
{ numberedDay: 9, isInTheCurrentMonth: true }, | ||
{ numberedDay: 10, isInTheCurrentMonth: true }, | ||
{ numberedDay: 11, isInTheCurrentMonth: true }, | ||
{ numberedDay: 12, isInTheCurrentMonth: true }, | ||
{ numberedDay: 13, isInTheCurrentMonth: true }, | ||
{ numberedDay: 14, isInTheCurrentMonth: true, isStartDate: true }, | ||
{ numberedDay: 15, isInTheCurrentMonth: true }, | ||
{ numberedDay: 16, isInTheCurrentMonth: true }, | ||
{ numberedDay: 17, isInTheCurrentMonth: true }, | ||
{ numberedDay: 18, isInTheCurrentMonth: true }, | ||
{ numberedDay: 19, isInTheCurrentMonth: true }, | ||
{ numberedDay: 20, isInTheCurrentMonth: true }, | ||
{ numberedDay: 21, isInTheCurrentMonth: true }, | ||
{ numberedDay: 22, isInTheCurrentMonth: true }, | ||
{ numberedDay: 23, isInTheCurrentMonth: true }, | ||
{ numberedDay: 24, isInTheCurrentMonth: true }, | ||
{ numberedDay: 25, isInTheCurrentMonth: true }, | ||
{ numberedDay: 26, isInTheCurrentMonth: true }, | ||
{ numberedDay: 27, isInTheCurrentMonth: true }, | ||
{ numberedDay: 28, isInTheCurrentMonth: true }, | ||
{ numberedDay: 29, isInTheCurrentMonth: true }, | ||
{ numberedDay: 30, isInTheCurrentMonth: true }, | ||
{ numberedDay: 31, isInTheCurrentMonth: true }, | ||
{ numberedDay: 1 }, | ||
{ numberedDay: 2 }, | ||
{ numberedDay: 3 }, | ||
{ numberedDay: 4 }, | ||
{ numberedDay: 5 }, | ||
{ numberedDay: 6 }, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
EuiCalendar, | ||
} from '../../../../src/components'; | ||
|
||
import { EXAMPLE_CAL_RANGE } from './calendar_demo_arrays'; | ||
|
||
export default () => ( | ||
<EuiCalendar days={EXAMPLE_CAL_RANGE} /> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src-docs/src/views/date_time/date_without_time_selector.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React, { | ||
Component, | ||
} from 'react'; | ||
|
||
import { | ||
EuiDateTime, | ||
EuiFormRow, | ||
} from '../../../../src/components'; | ||
|
||
import { EXAMPLE_CAL_SINGLE_DATE } from './calendar_demo_arrays'; | ||
|
||
export default class extends Component { | ||
constructor(props) { | ||
super(props); | ||
|
||
this.state = { | ||
isPopoverOpen: false, | ||
}; | ||
} | ||
|
||
closePopover() { | ||
this.setState({ | ||
isPopoverOpen: false, | ||
}); | ||
} | ||
|
||
render() { | ||
return ( | ||
<EuiFormRow label="Date with time selector"> | ||
<EuiDateTime | ||
isPopoverOpen={this.state.isPopoverOpen} | ||
closePopover={this.closePopover.bind(this)} | ||
days={EXAMPLE_CAL_SINGLE_DATE} | ||
value="12/18/2017" | ||
/> | ||
</EuiFormRow> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/components/form/date_time/calendar/calendar_month_year_selector.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.