Basicdatepicker setDateformat [Resolved]

Posted by Jaypalsinh under ASP.NET on 2/8/2011 | Points: 10 | Views : 2471 | Status : [Member] | Replies : 7
hi to all,
I am using the BasicDatePicker control, and i set the date format as "dd/MM/yyyy".
but when i select the date from the datepicker control then it gives me the date 1-jan-01 12:00:00 AM.
so plz help to solve this kind of problem.




Responses

Posted by: Naimishforu on: 2/8/2011 [Member] [MVP] Bronze | Points: 50

Up
0
Down

Resolved
Try changing your local region settings.. I think that's creating a problem as I had similar issue.

Thanks.

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Jaypalsinh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jaypalsinh on: 2/8/2011 [Member] Starter | Points: 25

Up
0
Down
Thanks Naimishforu,
i changed local region settings..... but it can't work.
when i choose date from the control then day is changed into month
for example today's date is 08/02/11 when i click on the control then it's change into 02/08/11/
can u help me out from this problem.

Jaypalsinh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/8/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hmm...can you please share the demo code if possible??

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Jaypalsinh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/8/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Also check out this example, I'm not sure what's wrong you are doing but you can achieve the same functionality though code also...

http://www.basicdatepicker.com/documentation/BasicFrame.WebControls.BasicDatePicker.SelectedDate.html

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Jaypalsinh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jaypalsinh on: 2/8/2011 [Member] Starter | Points: 25

Up
0
Down
Thanks Naimishforu,
The problem arise when i change the dateFormat property of the control.
when i set this property to "dd-MM-yyyy" then it's work.
but i want to "dd/MM/yyyy" format. this format is not worked. then it takes 01-jan-01 date.
i wrote the simple code but try to set dateFormat property to "dd/MM/yyyy" this is not worked.
now u know what is my problem.


Jaypalsinh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/8/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Yes, I got your problem. Appreciate if you can share a demo code or just upload it somewhere and share the link so that we can look into the same.

Thanks

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Jaypalsinh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jaypalsinh on: 2/8/2011 [Member] Starter | Points: 25

Up
0
Down

Login to post response