Page 1 of 1
How to Set Persain Date

Posted:
10 Nov 2015 09:32
by ariopax
Hi
I want set a default date in JQDatePicker of Persian calendar,for example i want put '1394/01/01' in it.
How to i do it?
Best Regards.
Re: How to Set Persain Date

Posted:
10 Nov 2015 10:56
by Alexander Bulei
Hi ariopax,
When property Regional is dporFarsiPersian, the component will convert the Gregorian date automatically.
Best Regards.
Re: How to Set Persain Date

Posted:
10 Nov 2015 11:22
by ariopax
Hi
I set property Regional to dporFarsiPersian,but when set date to '2015/21/03' that is '1394/01/01', but after compiling the jqdatepicker show
'2015/21/03'
Best Regards.
Re: How to Set Persain Date

Posted:
10 Nov 2015 16:41
by assapan
Hi if you set date in design mode you have the problem , but if when page is created or any other event you set
- Code: Select all
datepicker.date:=now;
then date is correctly displayed.
Re: How to Set Persain Date

Posted:
11 Nov 2015 08:10
by ariopax
Hi and Tanks assapan .
I set datepicker2.date:=now; and problem solved ,and datepicker2 show today in Persian date.
But how to set this date : 2015/03/21 that is in Persian date : 1394/01/01.
Because if i write datepicker1.date:=2015/03/01; after run datepicker1 show this date : 1280/08/10
and if i write datepicker1.date:=1394/01/01; after run datepicker1 show this date : 1282/08/02.
Best Regards.
Re: How to Set Persain Date

Posted:
11 Nov 2015 08:30
by assapan
EncodeDate(2015,03,21) should solve your problem

Re: How to Set Persain Date

Posted:
11 Nov 2015 09:04
by ariopax
Hi
Tanksssssssssssssssssssssssssss
Best Regards.