Nepali Date ( Nepali calender)

In Nepal, we have own calendar called Nepali Date. Is there any solution to integrate nepali calendar into erpnxt? I can provide all the calendar details .

From my perspective that will require many changes in the whole frappe framework.

Do you have a Nepali calender in Windows? Just out of curiosity?

For your kind information, Odoo, SAP, Oracle had implemented Nepali Calendar alredy in their system. Why not in Erpnxt?

Many People are looking solution for it.

Can We add following JS on each forms

or

Or any other solution possible?

No major changes to the framework should be necessary, and at first glance at least I see no reason why it couldn’t be done entirely via some custom JavaScript in an app. Since the relationship between the two calendars is entirely predictable, there’s no need to store any additional data. It would just be a matter of customizing the behavior of the field in the user interface.

1 Like

Dear Peterg

Can you please help me to set this up with an example?

Or where do I exactly need to change

Regards

Hi @alokkanodia,

You’ll need to hire a developer to set this up for you. It’s not available in the current code.

Finally i able to intgrate nepali calendar in Erpnxt susscesfully…

2 Likes

Can you please suggest how ?

@dipakthapa Could you share the code?
I want to intgrate Hijri Calender also

dipakthapa

How did you do it ? Could you share plz ?

Default Language must be english

~/frappe-bench/apps/frappe/frappe/public/js/frappe/form/controls/datepicker_i18n.js reach here and add following codes :
(function ($) {

$.fn.datepicker.language["en"] = {

	days: ["आईत", "सोम", "मंगल", "बुध", "बिही", "शुक्र", "शनि"],
	daysShort: ["आईत", "सोम", "मंगल", "बुध", "बिही", "शुक्र", "शनि"],
	daysMin: ["आईत", "सोम", "मंगल", "बुध", "बिही", "शुक्र", "शनि"],
	months: [
		"बैशाख",
		"जेठ",
		"असार",
		"सावन",
		"भदौ",
		"असोज",
		"कार्तिक",
		"मंसिर",
		"पौष",
		"माघ",
		"फागुन",
		"चैत",
	],
	monthsShort: [
		"बैशाख",
		"जेठ",
		"असार",
		"सावन",
		"भदौ",
		"असोज",
		"कार्तिक",
		"मंसिर",
		"पौष",
		"माघ",
		"फागुन",
		"चैत",
	],
	today: "Today",
	clear: "Clear",
	dateFormat: "dd.mm.yyyy",
	timeFormat: "hh:ii",
	firstDay: 1,
};

})(jQuery);

1 Like

From the looks of this, all it does is change the labels. It doesn’t actually change the calendar to proper Bikram Sambat logic. January => बैशाख, February => जेठ. That’s obviously not right.

1 Like

Then how it should be done kindly share me the way, would be thankful. I am working with this format

It will take some significant customization:

1 Like

This format will work fine if only what you are doing is creating quotations/making invoices and don’t need any back end reporting/analysis, automation etc.

Here’s an example.

If you have an employee’s join date as 2080/02/15 in BS, the system will give you an error which says you can’t join on a later date because as per the system it is only 2023. All you are doing is changing January to Baishak.

Also, it will not solve problems where a month in BS will have 32 days; or when no. of days in a Magh is 29 and on October, it is 31. How do you handle this ?

Change Company fiscal year to BS …like 2080 -2081, I think this will work

Give it a shot; I suspect you’ll see it won’t work. Try to date an invoice Jesth 30 (or, worse yet, Jesth 32) and let us know what happens.

1 Like

Ok, Surely. Thank You so much for your valuable inputs.

I am also working in it if you find any improvement plz share.
Thank You in advance