davide Posted October 19, 2016 Posted October 19, 2016 Hello everyone, i'm in trouble with personalization of client graphic issue of uniCalendarPanel. After some studing of js, extj and js-client-event, i have reached the goal of assign some new class to day cell of the calendar on the event datachange of the calendarpanel object. So i can change month in monthview and the event DateChange make the right work. My problem occur after login and after coming back to the calendar pannel after validation of an other form. In these two cases i need to fireup the event manually. I can't figure how to implement this beaviour. I think the correct js code is <my unicalendarpanel object identifyer>.fireEvent('DateChange', myStartDate, myStartWiewDate, myEndWiewDate); i can use it in a UniSession.addJS or in client-event to run the command, but can't find the correct moment to do that. During the login the mainform of the app is just redered and the code in DateChange event is just runned. After login when the mainform and unicalendarpanel object are shown at the client screen, the graphic is re-redered, but no event is fired (at list i beleave that or can't find that). thanks a lot, and sorry for my bad english. Davide Quote
Administrators Farshad Mohajeri Posted October 24, 2016 Administrators Posted October 24, 2016 You can use beforerender event. Quote
davide Posted October 24, 2016 Author Posted October 24, 2016 the login form is rendered "over the main form" so beforerender/render/afterrender are all fired before login is confrmed. When the mainform (with calendar panel of course) is showed whitout re-firing render's family event, I'm not able to explane better .... i'm put an alert on beforerender, the message appear during Loading (with uni square icon) , before aniting is showed. I try to use active event, but this event is fired to many time and slowly down the real rendering of the form. tks Davide Quote
Sherzod Posted October 24, 2016 Posted October 24, 2016 Hi, Can you simplify your question and make a small test case for this ?! Best regards. Quote
Administrators Farshad Mohajeri Posted October 24, 2016 Administrators Posted October 24, 2016 Why don't you use uniGUI standard login form? As far as I understand you are using a custom login form. Quote
Sherzod Posted October 24, 2016 Posted October 24, 2016 * and Please adjust your forum email in customer portal.. Instructions: http://forums.unigui.com/index.php?/topic/6291-important-announcement/ Quote
davide Posted October 25, 2016 Author Posted October 25, 2016 ok , i've just added my e-mail into the customer portal. (my CTO have bought the license) @FarshadMohajeri: i'm developopig over a platform that was alredy developed by some one else. that person also have incloude some delphi classes that work for desktop application, so I can not rewrite all the web application. @DelphiDeveloper: unfortunately is to strong to replicate the behavior in a new sample project, I try to do that tomorrow, I think there are to layer, classes and sublasses, to replicate and simplify. However i think I've found solution: putting the following code to call event from AfterShow event of mainform and on the call backfunction from the other form (that is opened over the mainform, so the unicaldar are not redraw automatically): UniSession.AddJS( 'var bound = '+uniCalendar1.JSName + '.getActiveView().getViewBounds();'+ uniCalendar1.JSName + '.fireEvent(''DateChange'','+uniCalendar1.JSName + ', '+uniCalendar1.JSName + '.getActiveView().getStartDate( ), bound.start, bound.end);' ); It seems to work, having some diffcult on callback function...come back soon to give you the response. Davide Quote
Actarus Posted February 28, 2023 Posted February 28, 2023 Any solution for fireing DateChange event inside a button? Quote
Sherzod Posted March 1, 2023 Posted March 1, 2023 13 hours ago, mazoom said: Any solution for fireing DateChange event inside a button? Your question is not very clear. Quote
Actarus Posted March 1, 2023 Posted March 1, 2023 4 hours ago, Sherzod said: Your question is not very clear. Is there any way to get the date range displayed by the component at any time? It is possible to call the event DateChange(Sender: TUniCalendarPanel; AStartDate, AViewStart, AViewEnd: TDateTime) through the click of a button? Quote
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.