Skip to content

Commit

Permalink
Merge pull request #126 from dejan9393/dismiss-keyboard
Browse files Browse the repository at this point in the history
fix(datepicker): Dismiss keyboard on press.
  • Loading branch information
feyy authored May 23, 2017
2 parents 2e63d0b + 6a29a33 commit f3f02ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {
TimePickerAndroid,
DatePickerIOS,
Platform,
Animated
Animated,
Keyboard,
} from 'react-native';
import Style from './style';
import Moment from 'moment';
Expand Down Expand Up @@ -244,6 +245,8 @@ class DatePicker extends Component {
return true;
}

Keyboard.dismiss();

// reset state
this.setState({
date: this.getDate()
Expand Down

0 comments on commit f3f02ce

Please sign in to comment.