diff --git a/components/cycle-day/symptoms/temperature.js b/components/cycle-day/symptoms/temperature.js index 7296883201ddb475bb2aa0ba5dac3bc0c6513144..611f972c15d417599b2e68825126321054bae738 100644 --- a/components/cycle-day/symptoms/temperature.js +++ b/components/cycle-day/symptoms/temperature.js @@ -70,8 +70,12 @@ export default class Temp extends Component { mode="time" isVisible={this.state.isTimePickerVisible} onConfirm={jsDate => { + let hours = jsDate.getHours() + if (hours < 10) hours = `0${hours}` + let minutes = jsDate.getMinutes() + if (minutes < 10) minutes = `0${minutes}` this.setState({ - time: `${jsDate.getHours()}:${jsDate.getMinutes()}`, + time: `${hours}:${minutes}`, isTimePickerVisible: false }) }}