select multiple dates by dragging over datepicker dates - extjs

I am using Extjs datepicker.
I want to select multiple dates of datepicker by dragging over them.
For that I tried to make calendar dates draggable. I took the reference from here https://docs.sencha.com/extjs/5.1/core_concepts/drag_drop.html and wrote below mentioned code.
var calendarDate = Ext.get('DatePickerSchedule').select('td');
Ext.each(calendarDate.elements, function(el) {
var dd = Ext.create('Ext.dd.DD', el, 'datesDDGroup', {
isTarget: true
});
//Apply the overrides object to the newly created instance of DD
Ext.apply(dd, window.overrides);
});
But it doesn't seems to be working. Please suggest what I am missing.

Check out this Previously Answered Question. There's a fiddle provided that demonstrates how to implement multi-select on a date picker. It doesn't use dragging but it may be a suitable solution for your needs.
EDIT:
So this question really got me interested in how you might go about solving this. So I've had a play around and created custom date picker that extends the ExtJS datepicker but provides drag support for multiple selections using the mouse listeners I had suggested in my comment.
The fiddle can be found here DraggableDatePicker
One improvement you may want to make is to make the component aware of rows and the values within rows, so that when you mouse over a new row all dates on that row (prior to the one currently with the mouseover) are selected. My solution only cares about individual cells that are dragged over.

Related

MUI DataGrid table cuts off custom column element

I'm working with MUI DataGrid, I need to render a custom calendar column. Everything seems to be working as expected, but... . the calendar picker is hidden by the table boundaries, this image illustrates better the situation.
I've been tried changing between different positions of the render element, but it does not work, please take a look on this code sandbox.
https://codesandbox.io/s/datagrid-react-modern-calendar-8v432y
What can I do to do not overflow the table boundaries, and show the calendar picker on top of everything?
Thanks a bunch for your help.

How to render events on different row in React-big-calender day and week view?

I am using react-big-calendar to render events, and I using month,week,days view. Everything works fine in month view, but if there are multiple events with same time slots then it would render in a single row(ref image below). Is there any way to render the event column-wise? Also, are there any good alternatives to react-big-calendar?
Unfortunately, the documentation site is out of date, or you'd know about the new dayLayoutAlgorithm prop. From the updated documentation (available by cloning the repo and running the 'examples'):
dayLayoutAlgorithm
A day event layout(arrangement) algorithm.
overlap allows events to be overlapped.
no-overlap resizes events to avoid overlap.
or custom `Function(events, minimumStartDifference, slotMetrics,
accessors)
type: custom
default: overlap

Can we do show less and show more in the All-day event in Week View Or react-big-calendar

Following are the two images i am being trying to implement
Can this functionality be added in all day event in week view
after clicking on 2 more it should expand
Is there anything been implemented in react-big-calendar to help me with this
React-Big-Calendar handles this via a popup, instead of inline. They have an example in their documentation.

Datepicker does not bind to Angular Model

I've made a date picker directive that uses a single date picker from the improvely datepicker library. It has two input tags and an OK button.
Date Picker Library
Single Date Picker Example
If I change the value of the input field via the keyboard the models get the desired value and calls to the server take place as expected. The problem arises when I use the date picker. The value of the model does not change. It still has the same value that I set via the keyboard.
But if I run document.getElementById('frompicker').value using the console it shows me the right date that I set using the datepicker.
If I don't set any value form the keyboard and only use the datepicker drop down, the values of the models are undefined.
I've tried a few solutions offered for Angular Boostrap UI Datepicker and Angular UI Datepicker. None of them work.
Edit after a comment
Code can be found here - https://plnkr.co/edit/HzkYzUajGlsZq5KhUwsx
Any help is greatly appreciated :)
You should sync scope after datepicker change via
$scope.$apply();
or
$scope.$evalAsync();
seems it 'apply.daterangepicker' event for your datepicker
I tried all the methods mentioned in different answers. My colleagues told that it's a bad idea to use $scope.$evalAsync() or $scope.$apply() unnecessarily. Our code base does not use digest, compile and the likes. So that was causing a hindrance.
I finally decided to detect the date change event as suggested by Valery Kozlov (the accepted answer) and manually changing the model.
I accessed the date like this.
$('#frompicker').val(); // can be done without jQuery as well
Changed the model using this.
// use Angular's $on to make things consistent if needed
$('#frompicker').on('apply.daterangepicker', function(ev, picker) {
scope.vm.from_date = $('#frompicker').val();
});

Is there anything about ext js?

I need a project about it ,thank you.I am using Ext.grid.gridpanel.As in rowclick event, we can handle row click of grid..Is there any event to handle column click of grid?
i want to select a particular column of grid.
You are looking for headerclick. Also for any more questions like this just look through the extjs documentation per your version. Sencha documents it very well.

Resources