Full calendar internal event drop to next date condition - calendar

I am dragging an event from 1st(or any date before the current date) of this month to current date(24/Jun) and to the next future days. How can we put the condition like events only drop-able on to current date and next future dates.
And while dragging an event with mouse pointer, the event is also dragged, here the requirement is can we add any icon with mouse pointer instead of event moving.
Scenario is: We have an icon, and when we drag an event from 10/Jun/2020 to 25/Jun/2020, from 10/Jun/2020 to 22/Jun/2020, while dragging the event with mouse pointer it should show ICON image with red cross mark(as it is invalid), once the dragging enters 23/Jun/20220, ICON image with out cross mark should come (as is is valid date). Please find the image.

Met the requirement by adding the below code, It just appends red cross circle icon to the event when we drag, still don't know how the original thing like with out event moving just icon(don't know how to add external icon rather than pre-existed red cross circle) should move.
eventConstraint:{
start: new Date(Date.now() + (20 * 60 * 1000)),
end: 'current month end'
}

Related

Ag-grid React CellMouseOut Event not being fired

onCellMouseOut event not being fired always.
I want to display some text on hovering of cells in the row. I am using Ag grid event call backs onCellMouseOver and onCellMouseOut. I am maintaining a variable which stores current row Index where mouse is present.I am redrawing the row when mouse enters any of its cells. The former event (onCellMouseOver) is being fired appropriately and but the later one(onCellMouseOut) is not being fired always on exiting the cells.
A working demo of my problem is present below:-
https://next.plnkr.co/edit/4lS8euZclar4i7j5
The text in second column is supposed to appear only when you hover on that particular row, and disappear when you move the mouse away from that row. Although some of the times it is behaving as expected but some of the times the mouseExit event is not being fired.
Other issue because of this is checkbox selection is not working since i'm redrawing the cells again.

Any Shortcut to add +1/2/3/4 weeks in current date in KendoUI Datepciker?

I am working on a scenario where I have a KendoUI date picker.
is it possible to have a quick selectable option for + 1/2/3/4 weeks,
Suppose, I have selected 1 May in datePicker, then if I press "1".. then it should add 7 days(1 week) in current date.
if I press "2", then it should add 14 days (2 weeks) in current date
using Kendo UI.
is there any solution for this?
The DatePicker has built-in keyboard shortcuts:
https://demos.telerik.com/kendo-ui/datepicker/keyboard-navigation
Focus:
Access key + w focuses the widget
Closed popup:
enter triggers change event
esc closes the popup
alt down arrow opens the popup
alt up arrow closes the popup
Opened popup (date view):
left arrow highlights previous day
right arrow highlights next day
up arrow highlights same day from the previous week
down arrow highlights same day from the next week
ctrl left arrow navigates to previous month
ctrl right arrow navigates to next month
ctrl up arrow navigates to previous view
ctrl down arrow navigates to next view
home highlights first day of the month
end highlights last day of the month
enter if in "month" view selects the highlighted day. In other views navigates to a lower view
The normal DatePicker behavior is for keyboard input to sent to the input box.
Not sure the benefit of having such a specialized dialog feature (1 is +1 week, 2 is +2 week,...) that would prevent typing in an actual date.
There are no component options for specifying your own keyboard handling so trying to override any keyboard handlers that the component is using would be tricky and fragile.

Drag and drop from qx.ui.table.Table (Qooxdoo version 5.x or master)

I am trying to drag from a qx.ui.table.Table widget to some other widget.
I fail to get information about the table row I am trying to drag.
I would like to drag a row (respectively its content) without it being focused or selected, e.g.g just click into the row and immediately start dragging.
Thanks,
Fritz
What I'm doing in this situation is to first set the tables focusCellOnPointerMove property to true.
If you don't want to have the feedback of cells being highlighted on mouse move, you could additionally call table.highlightFocusedRow(false) to supress that.
This way the table is "aware" of the cell/row being currently under the mouse pointer.
Then you're able to detect the current row index in the table's dragstart event handler:
_onDragStartGetFocusedRow : function(e) {
var index = this.getFocusedRow();
if(qx.lang.Type.isNumber(index)) {
// do something usefull with this information
// and start dragging
e.addAction("move);
e.addType("myType");
}
},
After finishing drag and drop you could reset the focused row by calling table.resetCellFocus() eg. in the dragend handler.
This does, of course, only work with pointer devices.

selenium webdriver can't drag and drop fullcalendar events

I'm using the selenium webdriver (python) to automate testing of an app that uses the fullcalendar js plugin library. However, I'm having trouble automating dragging and dropping events to the calendar.
After a lot of experimentation, I can see that the test code below moves the event element to the correct location. When this action is done by hand on the browser, the calendar square that you are hovering on turns blue and the event, when dropped, is added to the calendar. This does not happen when the event is moved via automation -- the calendar square does not turn blue, and the event, when dropped, returns to its original position.
How can I get the same drag and drop functionality under automation?
evt = self.sel.find_element_by_css_selector('#evt1')
cal_square = self.sel.find_element_by_css_selector('td[data-date=\'%s\']' % move_to_date.isoformat())
ActionChains(self.sel).click_and_hold(evt).move_to_element(cal_square).perform()
time.sleep(10)
ActionChains(self.sel).release().perform()
time.sleep(5)
Here's a link to at test case which demonstrates the issue:
https://gist.github.com/jenniferlianne/9353489
I have a problem with time while drag and drop. I need some wait after move_to_element and release, but after move_to_element.perform my mouse gets to the coordinates of dragged element and release over there. What can I do with that?
After a while I try this:
parent = driver.find_element_by_xpath("//*[contains(text(), 'Parent')]")
welcome_form = driver.find_element_by_id(link.my_forms["welcome_to_pdf_form"])
actions.click_and_hold(welcome_form).move_to_element(parent).click().perform()
I don't actually know why it works. I thought it will generate click after click and I will get an error but works fine.
My problem was that -- as Micheal pointed out -- after the move, the mouse was reverting back to original element position and doing the release() there. You can supply the release() function with the element where you want the 'mouse up' to happen.
For whatever reason, this works:
ActionChains(self.sel).click_and_hold(
evt).move_to_element(cal_square).release(cal_square).perform()
While this does not:
ActionChains(self.sel).drag_and_drop(evt, cal_square).perform()

rowdeselect event can't fire to save data when it is in last row in Extjs EditorGridPanel

I am using EditorGridPanel with cellEditor which acts nearly like Excel. We implemented Arrow Keys to move among rows and
columns. We do row validation when user moves from one row to another (specifically in rowdeselect event) and then save the
record. There is some issues are:
For the last row of the grid, rowdeselect event does not fire, as we do not have any other control after the grid.
rowdeselect event fires if we move from row to row using Tab, Enter & Arrow keys. But when user clicks on another row using mouse - events do not come in correct sequence, so focus moves to the new row, but earlier row not saved. Currently we solved this by calling stopEditing at the beginning of rowdeselect event.
We would like to know how we can solve these two issues and whether there are more robust ways to handle automatic grid saving.
You can fill free to check the problem in our site. -> http://www.softworksbd.com/swazilandlmis/yyyy_stockdata.php
1 ) First of all the event is not firing on the blur of the whole grid and not just the last row. try changing a row and clicking anywhere on the screen but the grid and you will see that no validation takes place (which means your rowdselect does not fire).
You should try and add a blue event to the whole grid that runs your validation scripts.
2) As far as I have checked the event is fired even on another row click so please explain exactly what you mean...
ps
I have viewed only this page in your application:

Resources