logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ainaz_ama  
#1 Posted : Sunday, October 4, 2020 12:39:55 PM(UTC)
ainaz_ama

Rank: Newbie

Groups: Registered
Joined: 9/29/2020(UTC)
Posts: 0
Iran (Islamic Republic Of)

Thanks: 2 times
I am working with seal reports to make reports but the problem is our date should be in persian form.
I want to change the date picker in seal report to persian one how should I do it?
Actually I have done it but it does not work, I copied my persianDatePicker javascript and css files to the path of seal report repository path and I changed some code in common.js as:

$(".datepicker_datetime").datetimepicker({
showClose: true,

format: 'YYYY/MM/DD',

});


$(".datepicker_date").pDatepicker({
showClose:true,

format: 'YYYY/MM/DD'

});
I also changed the Use custom template text to True in the seal report designer and also I add these code lines to the template as follows:

@Raw(report.AttachCSSFile("persian-datepicker.min.css"))
@Raw(report.AttachScriptFile("persian-date.min.js"))
@Raw(report.AttachScriptFile("persian-datepicker.min.js"))

but the report is empty although I have added elements to it and also a restriction on Date column of my table with (Prompt at Execution)

Would you please help me with this problem?
Thanks in advance,
Aynaz


epf  
#2 Posted : Monday, October 5, 2020 6:36:08 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 936
Switzerland

Thanks: 14 times
Was thanked: 159 time(s) in 153 post(s)
can you try to add 2 JS in the Views\Scripts\i18n subfolders of your repository:
one for moment.js got from https://github.com/momen...tree/develop/dist/locale
one for the picker got from https://github.com/snapa...v1.13.0-dev/dist/js/i18n

then change your default culture in the Server Manager or in the Report it should be dynamic as it is loaded in Report.cshtml with:
Code:
    @if (view.CultureInfo.TwoLetterISOLanguageName != "en")
    {
        @Raw(report.AttachScriptFile("i18n\\moment." + view.CultureInfo.TwoLetterISOLanguageName + ".js"))
        @Raw(report.AttachScriptFile("i18n\\selectpicker." + view.CultureInfo.TwoLetterISOLanguageName + ".min.js"))
    }


For translations, check also https://sealreport.org/Recipes#lineTranslations


Good luck.
thanks 1 user thanked epf for this useful post.
ainaz_ama on 10/10/2020(UTC)
ainaz_ama  
#3 Posted : Tuesday, October 13, 2020 5:46:53 AM(UTC)
ainaz_ama

Rank: Newbie

Groups: Registered
Joined: 9/29/2020(UTC)
Posts: 0
Iran (Islamic Republic Of)

Thanks: 2 times
Thank you for your reply, but it seems that this does not work, I did all this but date picker still displays Gregorian calendar to select from.

Thanks
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.