-
Notifications
You must be signed in to change notification settings - Fork 957
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui): calendar min-max navigation
- Loading branch information
Showing
6 changed files
with
66 additions
and
47 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
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
39 changes: 39 additions & 0 deletions
39
src/playground/src/ui/screen/showcases/calendar/calendarBounds.component.tsx
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 from 'react'; | ||
import { StyleSheet } from 'react-native'; | ||
import { | ||
Calendar, | ||
Layout, | ||
} from 'react-native-ui-kitten'; | ||
|
||
const now = new Date(); | ||
|
||
export class CalendarBoundsShowcase extends React.Component { | ||
|
||
state = { | ||
date: new Date(), | ||
}; | ||
|
||
onSelect = (date) => { | ||
this.setState({ date }); | ||
}; | ||
|
||
render() { | ||
return ( | ||
<Layout style={styles.container}> | ||
<Calendar | ||
min={new Date(now.getFullYear(), now.getMonth(), 15)} | ||
max={new Date(now.getFullYear(), now.getMonth() + 1, 15)} | ||
date={this.state.date} | ||
onSelect={this.onSelect} | ||
/> | ||
</Layout> | ||
); | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
padding: 16, | ||
minHeight: 376, | ||
}, | ||
}); |
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