PDA

View Full Version : [CLOSED] DatePickerField - Date format



sveins12
Feb 02, 2017, 4:17 AM
It seems that setting DateFormat doesn't have any effect. It alwys tend to format like this '06/24/2016'.



x.DatePickerField()
.Label("Date")
.DestroyPickerOnHide(true)
.Name("date")
.DateFormat("d-m-Y")
.Picker(
x.DatePicker()
.YearFrom(1990)
.DateValue(new DateTime(2016, 6, 24))
)
)

fabricio.murta
Feb 03, 2017, 12:25 AM
Hello @sveins12!

I'm getting this alright on chrome, any specific browser you are trying with?..

I also tested changing the separators to see what happens, and the date field follows.

I changed it to this, for example:



.DateFormat("d.m.Y")


And I get here "24.06.2016" (if I just choose initially selected date).

fabricio.murta
Feb 25, 2017, 4:54 AM
Hello @sveins12!

Been some time since we posted a follow-up here and still no feedback from you. Do you still need help with this issue? We may mark this as closed if you don't reply in 7+ days, but that won't prevent you from posting your feedback when you feel like.

sveins12
Feb 27, 2017, 8:23 AM
How can I get this format: "2017-02-29"

geoffrey.mcgill
Feb 27, 2017, 8:27 AM
Did you try DateFormat("Y-m-d")?

sveins12
Feb 27, 2017, 8:36 AM
Thank you. I think the case is solved then.