DateRangePicker doesn't work in related-list after searching
If in realted list there is a dateField, after a related list searching, DateRangePicker doesn't work.
First time related list is loaded, DateRangePicker works fine, but after a click on Search button, DateRangePicker stops to work.
This problem arises into
layouts/v7/modules/Vtiger/resources/RelatedList.js:131
loadRelatedList : function(params){
...
},
loadRelatedList() calls
vtUtils.applyFieldElementsView(container);
and, immediately after, it's triggered 'post.relatedListLoad.click' event
app.event.trigger('post.relatedListLoad.click', container);
'post.relatedListLoad.click' event is caught by layouts/v7/modules/Vtiger/resources/Detail.js:734
app.event.on("post.relatedListLoad.click",function(event, container){
vtUtils.applyFieldElementsView(container);
vtUtils.enableTooltips();
var vtigerInstance = Vtiger_Index_Js.getInstance();
vtigerInstance.registerMultiUpload();
//For Rollup Comments
self.registerRollupCommentsSwitchEvent();
//END
});
so vtUtils.applyFieldElementsView() is called two times and DateRangePicker plug-in stops to work
To fix the bug, simply delete
vtUtils.applyFieldElementsView(container);
from loadRelatedList() function (layouts/v7/modules/Vtiger/resources/RelatedList.js:111)