Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/components/DatePicker/index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,10 @@ class Datepicker extends React.Component {
Datepicker.propTypes = datepickerPropTypes;
Datepicker.defaultProps = defaultProps;

/**
* We're applying localization here because we present a modal (with buttons) ourselves
* Furthermore we're passing the locale down so that the modal and the date spinner are in the same
* locale. Otherwise the spinner would be present in the system locale and it would be weird if it happens
* that the modal buttons are in one locale (app) while the (spinner) month names are another (system)
*/
export default withLocalize(Datepicker);
7 changes: 7 additions & 0 deletions src/components/DatePicker/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Using a .css file is a special case here, because it's impossible to target
* pseudo-elements from js code (e.g. ::-webkit)
* It also helps in cases like using the Datepicker in Storybook - the styles are imported
* with the component
*/

.expensify-datepicker::-webkit-calendar-picker-indicator {
position: absolute;
right: 12px;
Expand Down