Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need new feature for event #90

Open
ginkosen opened this issue Mar 8, 2023 · 5 comments
Open

need new feature for event #90

ginkosen opened this issue Mar 8, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@ginkosen
Copy link

ginkosen commented Mar 8, 2023

Thank you for sharing

need some new event

  • headerToolbar > prev,today,next fire click event
  • dateClick need dateDblclick
  • eventClick need eventDblclick

Best wishes for you . Thanks again.

@vkurko
Copy link
Owner

vkurko commented Mar 9, 2023

Thanks for the suggestions.

headerToolbar > prev,today,next fire click event

There is a datesSet callback that can be useful in this case. Have you tried it?

dateClick need dateDblclick
eventClick need eventDblclick

It looks like there is a similar request in FullCalendar, but it has not yet been implemented there. I'll think about what can be done.

@ginkosen
Copy link
Author

ginkosen commented Mar 9, 2023

Thanks for the suggestions.

headerToolbar > prev,today,next fire click event

There is a datesSet callback that can be useful in this case. Have you tried it?

dateClick need dateDblclick
eventClick need eventDblclick

It looks like there is a similar request in FullCalendar, but it has not yet been implemented there. I'll think about what can be done.

Thanks for replay .

There is a [datesSet](https://github.com/vkurko/calendar#datesset) callback that can be useful in this case. Have you tried it?

I found this , It's my negligence.

dateClick need dateDblclick
eventClick need eventDblclick

In my case dateDblclick, i want to create an new event with dbclick

and eventDblclick , i want to open the event info with dbclick

@AdityaPainuli
Copy link

Hey I have an alternative solution incase you want to use it . My software right now uses full calendar in which I solve the double click problem like this .
On eventDidMount I used this particular function
image

@vkurko vkurko added the enhancement New feature or request label Apr 19, 2023
@krizzzly
Copy link

krizzzly commented Oct 18, 2023

you can use this helper function:

var clickEvent = (function(e){

    var eventClickTimes = {};
    var dblClickTimeFrame = 500;

    var _noDoubleClickAction = function(e,jetzt){
        eventClickTimes[e.event.id] = jetzt;
        return false;
    }

    var _doubleClickAction = function(e){
        delete eventClickTimes[e.event.id];
        return true;
    }

    return {
        isDouble: function(e){
            var jetzt = Date.now();
            // nobody clicked on that event yet
            if(!eventClickTimes[e.event.id]) return _noDoubleClickAction(e,jetzt);
            // somebody already clicked, but the timeframe for a doubleclick was too long
            if(((jetzt - eventClickTimes[e.event.id]) > dblClickTimeFrame)) return _noDoubleClickAction(e);
            // yes. a dblclick
            return _doubleClickAction(e);
        }
    }
})();

And you can check on eventClick with clickEvent.isDouble(e)

@ginkosen
Copy link
Author

you can use this helper function:

var clickEvent = (function(e){

    var eventClickTimes = {};
    var dblClickTimeFrame = 500;

    var _noDoubleClickAction = function(e,jetzt){
        eventClickTimes[e.event.id] = jetzt;
        return false;
    }

    var _doubleClickAction = function(e){
        delete eventClickTimes[e.event.id];
        return true;
    }

    return {
        isDouble: function(e){
            var jetzt = Date.now();
            // nobody clicked on that event yet
            if(!eventClickTimes[e.event.id]) return _noDoubleClickAction(e,jetzt);
            // somebody already clicked, but the timeframe for a doubleclick was too long
            if(((jetzt - eventClickTimes[e.event.id]) > dblClickTimeFrame)) return _noDoubleClickAction(e);
            // yes. a dblclick
            return _doubleClickAction(e);
        }
    }
})();

And you can check on eventClick with clickEvent.isDouble(e)

Thanks. I have sloved with other way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants