Drag and drop external events to now-calendar component
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
Our team is deveoping a custom workspace for a client. Here we have to use now-calendar component. There will be 2 containers one will have task cards which are in open state and the other will be OOB now-calendar component. we can create new events using new button in now-calendar component. But the client is asking for drag and drop feature. He wants to drag the task card into calendar timeframe. This action should make task assigned to a particular person and he should work on that task in a particular time frame. Now OOB cards available doesn't have drag functionality. So we had to develop draggable custom cards which will hold task data and drop it to the calendar component. Now we have developed a sample card component which can be dragged. But we are unable to drop it to the calendar compoent. We are not sure how to add the drop functionality. Please help us add the drop functionality.
Below are the files for sample card component I have developed for testing in my PDI.
code in index.js file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Just like OOB cards not being 'draggable', the OOB calendar component is not 'droppable', so that also requires a custom calendar component. But you mention that you "have to use now-calendar component". Why is that? Because if there is a reason for that and you can't build a custom one, the requirement just won't fly.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Mark,
OOB calendar component accepts external drops. We have seen this in CSM/FSM dispatcher workspace. In this workspace they are using OOB now-calendar component. I am attaching dispatcher workspace image for reference. In the left container there are work order task cards. Here these cards can be dragged and dropped into the calendar component and be assigned to a technician. To acheieve this functionality ServiceNow built a custom "Field Service Card" component. This is developed by Servicenow only for FSM workspace. We need to something very similar to this. Since we cannot use this "Field Service Card" compnent, we have to develop a component simliar to this.
We can develop our own custom calendar component as you said, but we have to do more work for that. We saw this working in FSM workspace and thought of similar functionality using now-calendar component. Using OOB calendar component will greatly reduce our workload.