arilotta Posted December 27, 2017 Share Posted December 27, 2017 Hi all, is there a way to intercept the date change event on a TUniCalendar component ? There is only then OnClick event, but it is not fired when you change the date using the month selector, for example. Thanks Andrea Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 27, 2017 Share Posted December 27, 2017 Hi, You can try to use this approach: UniCalendar -> ClientEvents -> UniEvents -> Ext.picker.Date [picker] -> beforeInit fn: function picker.beforeInit(sender, config) { Ext.override(Ext.DatePicker, { isAnotherMonthView: function(date) { var activeDate = this.activeDate || date; return date.getYear() != activeDate.getYear() || date.getMonth() != activeDate.getMonth(); }, update: function(date, forceRefresh) { var me = this; monthViewChange = me.isAnotherMonthView(date); this.callParent(arguments); if (monthViewChange) { Ext.defer(function() { me.fireEvent("select"); }, 200); } } }); } http://forums.unigui.com/index.php?/topic/7353-tunicalendar-highlight-days-and-more/&do=findComment&comment=38082 Best regards, Quote Link to comment Share on other sites More sharing options...
arilotta Posted December 28, 2017 Author Share Posted December 28, 2017 Thank you, it works ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.