Skip to content

Commit d17f58e

Browse files
Merge pull request #8 from RavisaraDev/feature/dark-mode
🦇 modal darkmode support
2 parents 125f457 + e9e2e1c commit d17f58e

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

‎README.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,19 @@ const App = () => {
3939

4040
| Props| Type | Description
4141
| -------- | ------- | -------- |
42-
| date | ```Moment``` | ```moment()``` Moment date object (Required)
42+
| date | ```Moment``` | If your need to show placeholder on initial load just pass ```undefined```, else for default value pass ```moment()``` object
4343
| onChange |```Function```| Callback triggered on date select (Required)
44+
| placeholder | ```String``` | Custom placeholder text
45+
| placeholderStyles | ```Object``` | Placeholder text styles
46+
| modalBackgroundColor | ```String``` | Calendar modal background color
4447
| headerStyles | ```Object``` | Header wrapper styles
4548
| customHeader | ```Function``` | Function should return a component. Args: ```(date, month, year, setMonth, setYear)```
4649
| weekHeaderTextColor | ```String``` | Week days names text color
4750
| selectedDateHighlightColor | ```String``` | Selected date highlight marker color
4851
| selectedDateHighlightRadius | ```Number``` | Selected date highlight marker radius
4952
| datesColor | ```String``` | Calendar date color
5053
| selectedDateColor| ```String``` | Selected calendar date color
51-
| fieldButtonStylesDateFormat | ```String``` | Selected date showing format. [Available formats](https://momentjs.com/docs/#/parsing/string-format/)
54+
| fieldButtonStylesDateFormat | ```String``` | Selected date showing format. [Available formats](https://momentjs.com/docs/#/displaying/format/)
5255
| fieldButtonStyles | ```Object``` | Field button styles
5356
| fieldButtonTextStyles | ```Object``` | Field button text styles
5457

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-calendarview-datepicker",
3-
"version": "0.0.7",
3+
"version": "0.0.8",
44
"description": "🌿 React-native date picker component ",
55
"main": "index.js",
66
"repository": {

‎src/DatePickerCalendar.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const DatePickerCalendar = ({
1313
fieldButtonStylesDateFormat,
1414
fieldButtonStyles,
1515
fieldButtonTextStyles,
16+
modalBackgroundColor,
1617
customHeader,
1718
headerStyles,
1819
weekHeaderTextColor,
@@ -39,7 +40,7 @@ const DatePickerCalendar = ({
3940
{isOpen && (
4041
<Modal animationType={"fade"} transparent={true} presentationStyle={'overFullScreen'} visible = {isOpen} onRequestClose = {() => setIsOpen(!isOpen) }>
4142
<TouchableOpacity style={styles.modalBackground} onPress={() => setIsOpen(!isOpen)}>
42-
<View style={[styles.modal]}>
43+
<View style={[styles.modal, modalBackgroundColor && {backgroundColor: modalBackgroundColor}]}>
4344
<Header
4445
date={date}
4546
customHeader={customHeader}

0 commit comments

Comments
 (0)