Fix: Specify the title for timePicker in IOS
This commit is contained in:
@@ -94,6 +94,7 @@ const Temperature = ({ data, date, save }) => {
|
||||
onConfirm={setTime}
|
||||
onCancel={() => setIsTimePickerVisible(false)}
|
||||
display={Platform.OS === 'ios' ? 'spinner' : 'default'}
|
||||
headerTextIOS="Pick a time"
|
||||
/>
|
||||
</Segment>
|
||||
</React.Fragment>
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Platform } from 'react-native'
|
||||
import DateTimePicker from 'react-native-modal-datetime-picker'
|
||||
|
||||
import AppSwitch from '../../common/app-switch'
|
||||
|
||||
import { saveTempReminder, tempReminderObservable } from '../../../local-storage'
|
||||
import {
|
||||
saveTempReminder,
|
||||
tempReminderObservable,
|
||||
} from '../../../local-storage'
|
||||
import padWithZeros from '../../helpers/pad-time-with-zeros'
|
||||
|
||||
import labels from '../../../i18n/en/settings'
|
||||
@@ -43,8 +47,10 @@ export default class TemperatureReminder extends Component {
|
||||
render() {
|
||||
const { isEnabled, isTimePickerVisible, time } = this.state
|
||||
|
||||
const tempReminderText = time && isEnabled ?
|
||||
labels.tempReminder.timeSet(time) : labels.tempReminder.noTimeSet
|
||||
const tempReminderText =
|
||||
time && isEnabled
|
||||
? labels.tempReminder.timeSet(time)
|
||||
: labels.tempReminder.noTimeSet
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
@@ -58,6 +64,8 @@ export default class TemperatureReminder extends Component {
|
||||
mode="time"
|
||||
onConfirm={this.onPickDate}
|
||||
onCancel={this.onPickDateCancel}
|
||||
display={Platform.OS === 'ios' ? 'spinner' : 'default'}
|
||||
headerTextIOS="Pick a time"
|
||||
/>
|
||||
</React.Fragment>
|
||||
)
|
||||
|
||||
+4
-3
@@ -7,10 +7,11 @@
|
||||
"cycleDay": " day of your cycle",
|
||||
"cyclePhase": " cycle phase - ",
|
||||
"addDataForToday": "add data for today"
|
||||
},
|
||||
},
|
||||
"shared": {
|
||||
"cancel": "Cancel",
|
||||
"ok": "OK"
|
||||
"ok": "OK",
|
||||
"dateTimePickerTitle": "Pick a time"
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
@@ -19,4 +20,4 @@
|
||||
"text": "Copyright (C) {{currentYear}} Bloody Health GbR\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details: https://www.gnu.org/licenses/gpl-3.0.html\n\nYou can contact us by drip@mailbox.org."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user