How to change date format for Admin interface?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 лет назад
In nopcommerce/administration all date fields are in us format "mm/dd/yyyy" despite configuration->languages set to "en-GB".
Is there a way I can change it to e.g. "dd/mm/yyyy" accross all admin pages?
So far I tried to add
<globalization culture="en-GB" uiCulture="en-GB"/>
to both web.config and even add the following code to BaseNopAdministrationPage constructor
public BaseNopAdministrationPage()
        {
            Thread.CurrentThread.CurrentCulture =
            CultureInfo.CreateSpecificCulture("en-GB");
            Thread.CurrentThread.CurrentUICulture = new
                CultureInfo("en-GB");

            base.InitializeCulture();
        }


Nothing worked and the dates were still in "mm/dd/yyyy" that is really anoying.
The only thing I managed to do is to explicitly set the format for every ajaxToolkit:CalendarExtender I could find in admin. At the moment I am doing upgrade my store from 1.2 to 1.4 and coping all these setting is really time consuming and boring.
Did anybody solve this problem in more efficient way?
14 лет назад
Anyone? Are you all guys using mm/dd/yyyy format for admin?
14 лет назад
Go to your language detail page (admin area) and set its language culture property to any culture that supports "dd/mm/yyyy" (e.g. ru-RU)
14 лет назад
if you mean /Administration/Languages.aspx, it's set to en-GB as i mentioned. I have not tried with ru-RU though
14 лет назад
I confirm, I use fr-FR and also have the same problem date is displayed MM/DD/YYYY in the admin pages.
14 лет назад
Changing the main.master scriptmanger localization properties to true in the store administration folder may help.

Regards, Neil
14 лет назад
i'm using v1.4

en-GB works perfect for me - even pdfinvoice


UPDATE

actually, it does not work everywhere in admin but it can be easily fixed :

nenwmn is correct
1. Open \Administration\main.master.
2. Set EnableScriptLocalization and EnableScriptGlobalization of the ScriptManager to true

(information from post)  https://www.nopcommerce.com/Boards/Topic.aspx?TopicID=2854
12 лет назад
a.m. wrote:
Go to your language detail page (admin area) and set its language culture property to any culture that supports "dd/mm/yyyy" (e.g. ru-RU)


I have 2.10 version and just by changing the language cultute propery doesn't change the date format.
I also want the  "dd/mm/yyyy" format both for United Kingdom -English and for Greek...

Is there anything else that could be done???
12 лет назад
VerusPlus wrote:
I have 2.10 version and just by changing the language cultute propery doesn't change the date format.
I also want the  "dd/mm/yyyy" format both for United Kingdom -English and for Greek...

Is there anything else that could be done???

Date format for admin area should be set to 'en-US' in 2.X versions. It's set in SetWorkingCulture() method in \Presentation\Nop.Web\Global.asax.cs file. We set culture of admin area to 'en-US' because current implementation of Telerik grid doesn't work well in other cultures (e.g., editing decimal value in other culture)
12 лет назад
So does that mean that the date format in Admin area will be mm/dd/yyyy no matter which Language culture we have selected??
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.