The visualforce page uses a date picker which should show data only on dd/MM/yyyy format. When selecting the date and clicking save button, the date string is parsed using Date.parse and the date is saved. This works fine if the users locale is English(India), French, but if the users locale is set as German or italian this is throwing error saying Invalid date format? Any idea?


I assume you are getting that date as string use date.newInstance method and pass year month and date separately before putting it to database

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.