Fix "jQuery.fn.mousedown() event shorthand is deprecated" warning

This patch replaced the deprecated mousedown() event shorthand
with on('mousedown', ...) as suggested by the jQuery documentation[1].
This change ensures compatibility with the latest version of jQuery
and resolves the deprecation warning.

[1] https://api.jquery.com/mousedown/#mousedown-handler.

Change-Id: I2ccba8236d5831f4c81b3f963b7dc54fb98d95b8
This commit is contained in:
manchandavishal 2023-04-10 22:21:55 +05:30
parent 7d44796eca
commit c397560d0d

View File

@ -168,11 +168,11 @@ horizon.forms = {
endDate.hide();
}).data('datepicker');
$("#id_start").mousedown(function(){
$("#id_start").on("mousedown", function() {
endDate.hide();
});
$("#id_end").mousedown(function(){
$("#id_end").on("mousedown", function() {
startDate.hide();
});