diff --git a/src/components/DatePicker/index.ios.js b/src/components/DatePicker/index.ios.js index 6a9bd65f7621..127523b267cc 100644 --- a/src/components/DatePicker/index.ios.js +++ b/src/components/DatePicker/index.ios.js @@ -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); diff --git a/src/components/DatePicker/styles.css b/src/components/DatePicker/styles.css index d82e5488a00f..e477dc4c8451 100644 --- a/src/components/DatePicker/styles.css +++ b/src/components/DatePicker/styles.css @@ -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;