Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet

I want to add a new input field inside the existing DateTimeField input field to support the Nepali Date Field. I have inherited the "web.DateTimeField" template and added an input field, which works perfectly.

I need to ensure the input fields convert dates between the Nepali Date and the standard DateTime widget. Users should be able to select dates using either the Odoo Datepicker or NepaliDatepicker, with automatic conversion between them based on the selected date.

I have patched the DateTimeField JS class and successfully displayed the Nepali Date in read-only mode as a label, but I couldn't set it to the input field.

The NepaliDatepicker works in the input field, but I want to update the Odoo Date Field value when the user selects a date in the NepaliDatepicker and vice versa.

I don't want to create a new widget because I don't want to add a custom widget to all Date and Datetime fields.

Note: I am using Odoo 17 Community.


Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Juli 25
1001
1
Juni 24
4006
2
Mai 24
2068
2
Mai 24
3470
1
März 22
8450