Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Problem with Convert datetime to Persian View modes: 
User avatar
Member
Member
poyanj-yahoo - 7/2/2012 5:08:51 AM
   
Problem with Convert datetime to Persian
Hi,
I have already localized Calender for Persian date in Kentico( I mean CMSAdminControls/Calender)
it shows persian dates Correctly when culture of page is "fa-ir".when I add a Document Type or BIZform that contain a field with datatype e Datetime and use that Calender it creates object correctly in database and datetime has been saved correctly in gregorian date but problem is when I want to edit that document type or Bizform in page with persian Cultue it gives me error in put value of persian date in related TextBox.
error like this:
"Error loading the FormControl 'ReleaseDate']
String was not recognized as a valid DateTime"
it happens only on some Dates for Example:
when I select 1391-04-31 00:00:00.000(persian date) from Calender and save document type(or Bizform) it saves 2012-07-21 00:00:00.000 in database that is Correct Date.but when I want to edit that object in "fa-ir" UI Culture it dose not show TextBox and instead of textbox it shows Error:
"Error loading the FormControl 'ReleaseDate']
String was not recognized as a valid DateTime"
but for 1391-05-31 00:00:00.000 every thing is Ok and again for 1391-06-31 00:00:00.000 gives me error.
do you have any Idea whitch function has this Problem and wher can I Edit that function to solve the problem.
Thank You

Farbod Kishani

User avatar
Member
Member
poyanj-yahoo - 7/7/2012 3:55:05 AM
   
RE:Problem with Convert datetime to Persian
Hi,
I have posted a bug of Kentico 5 Days ago and no body has answered me until now.why?

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 7/10/2012 8:44:29 PM
   
RE:Problem with Convert datetime to Persian
Hi,

For submitting bugs, please use the form at http://www.kentico.com/Support/Report-a-bug

Please note: The forums are currently intended for Kentico community. Although we monitor them, we cannot guarantee a timely response.

Regards,
Zdenek

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 7/13/2012 5:14:33 AM
   
RE:Problem with Convert datetime to Persian
Hi,

Additionally to the issue - could you please send us the details with the information about your calendar localization to our support email or submit it through the "report bug" page?

Thanks and regards,
Zdenek

User avatar
Member
Member
caspian_softdev-yahoo - 4/24/2013 4:42:36 AM
   
RE:Problem with Convert datetime to Persian
dear farbod

you need to set Culture of Page current thread to persian culture.

for doing this you need to have in depth information about reflection, as Microsoft don't support Persian Calender (it is proposed for future but not activated for the time being)
by using reflection you can change the calender type of Culture
but this is not enough for you to make kentico cms persian calender compatible
in addition you must have or BUY kentico cms with source code.

best regards
Amir