Skip to content

Commit

Permalink
fix: calendar in Arabic (backport #26213) (#26215)
Browse files Browse the repository at this point in the history
* Revert "fix(ar): render fullcalendar in english (#26207)"

This reverts commit e4ed1b9.

(cherry picked from commit 602ff82)

# Conflicts:
#	frappe/public/js/frappe/views/calendar/calendar.js

* fix(calendar): always use english dates for API calls

(cherry picked from commit 72d81af)

* chore: conflicts

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush committed Apr 30, 2024
1 parent ce4fa2a commit 67530e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cypress/integration/control_duration.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ context("Control Duration", () => {

it("should set duration", () => {
get_dialog_with_duration().as("dialog");
cy.wait(500);
cy.get(".frappe-control[data-fieldname=duration] input").first().click();
cy.get(".duration-input[data-duration=days]")
.type(45, { force: true })
.blur({ force: true });
cy.wait(500);
cy.get(".duration-input[data-duration=minutes]").type(30).blur({ force: true });
cy.wait(500);
cy.get(".frappe-control[data-fieldname=duration] input")
.first()
.should("have.value", "45d 30m");
Expand Down
2 changes: 1 addition & 1 deletion frappe/public/js/frappe/views/calendar/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ frappe.views.Calendar = class Calendar {

get_system_datetime(date) {
date._offset = moment(date).tz(frappe.sys_defaults.time_zone)._offset;
return frappe.datetime.convert_to_system_tz(date);
return frappe.datetime.convert_to_system_tz(moment(date).locale("en"));
}
setup_options(defaults) {
var me = this;
Expand Down

0 comments on commit 67530e3

Please sign in to comment.