Hi, I am using this package and it works fine for me, attached captures:


But I need 2 things:
How do I add a point (.) to AM and PM format? I need to display A.M and P.M because the api that I am using in this project is like this and does not accept it without a point.
How to translate the library into Spanish? to display date in spanish
Thanks in advance
regards
@pixsolution
Yup, I agree with @hetmann (thanks for posting).
Regarding the first question, react-native-modal-datetime-picker uses the standard JS date format, so you should be able to format it manually.
Thank you for your answers @hetmann @mmazzarolo but:
`//option 1
NSLocale * locale = [[NSLocale alloc] initWithLocaleIdentifier:@"es_ES"];
datePicker.locale = locale;
datePicker.calender = [locale objectForKey:NSLocaleCalender];
//option 2
NSString *currentLanguage = [[NSLocale preferredLanguages] firstObject];
[[UIDatePicker appearance] setLocale:[[NSLocale alloc]initWithLocaleIdentifier:@"es_ES"]];`
attached also capture of the device so that you see that it is configured in Spanish, and nothing it keeps showing everything of the package in English

@pixsolution the locale prop is used to render the date/time based on regions, basically it will translate it to Spanish: Monday -> Lunes
The idea is that the DateTimePicker will give you a value and you can format that value based on your needs.
Formatting is done using libraries like this:
Most helpful comment
@pixsolution the locale prop is used to render the date/time based on regions, basically it will translate it to Spanish: Monday -> Lunes
The idea is that the DateTimePicker will give you a value and you can format that value based on your needs.
Formatting is done using libraries like this: