Click here to Skip to main content
14,875,778 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
am using datepicker in xamarin forms but it shows date format by defualt "MM/dd/yyyy" and i have changed it to "dd/MM/yyyy" but when i bind the datepicker with viewmodel on save command then it changed to "MM/dd/yyyy" on my model and my model date property is in string type. also when i pass any string date from database to datepicker it does not change the date in this i have to convert date to again "MM/dd/yyyy", I want to ask is their any solution to format datepicker to parmanent to "dd/MM/yyyy" because i want to save and show date in "dd/MM/yyyy" format. Thanks u in advance.


What I have tried:

DateTime GDate = Convert.ToDateTime(EditItem.ReceivingDate.Substring(0,10),
                     System.Globalization.CultureInfo.GetCultureInfo("hi-IN").DateTimeFormat);

               var dd = GDate.ToString("MM/dd/yyyy");
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900