react-native-datetimepicker / datetimepicker

React Native date & time picker component for iOS, Android and Windows
MIT License
2.42k stars 394 forks source link

Styling in react-native-windows #175

Open steventiro opened 4 years ago

steventiro commented 4 years ago

Hi, i am new to react-native-windows I try to change datetimepicker border width, font and font size using style props but nothing change

here is my code: ` <DateTimePicker style={[globalStyle.textInput, {width: 150, height: 25, minHeight: 25, fontSize: 10, borderWidth: 0}, props.inputStyle]} value={props.dateValue} mode='date' display="default" onChange={(event, selectedDate) => props.onDateChange(event, selectedDate)} />

`

Please help

vonovak commented 4 years ago

@rectified95 can you please comment on whether or not this is customizable at all? Thanks!

rectified95 commented 4 years ago

@vonovak Sorry I missed this one completely! I will take a look this coming Monday and reply! FYI @steventiro

EDIT Taking a quick look - this should be possible, not sure why it doesn't work right now, as the property should be translated to XAML out of the box. Will look more on Monday. There is a 'BorderThickness' property on the XAML CalendarDatePicker, so this should be easy. Ref: https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.calendardatepicker?view=winrt-19041#properties

lbenitez1 commented 1 year ago

@vonovak Has this been fixed? I am currently using "@react-native-community/datetimepicker": "^6.3.1" and setting the fontSize in the style prop as done above does not work.