search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Is clearSelection available?

Asked by Jeff
9 months ago.

I am investigating using DayPilot (ASP.NET Web Forms), and I would like to be able to offer the user an ability to cancel event creation -- I want to then call clearSelection as I have seen in some javascript documentation. Is there a way?

Answer posted by Dan Letecky [DayPilot]
9 months ago.

Yes, the clearSelection() client-side method is available in the ASP.NET WebForms version as well.

You can find an example in the main Scheduler demo:

The selection gets cleared if the modal dialog with new event details is canceled.


  function dialog() {
    var modal = new DayPilot.Modal();
    modal.onClosed = function (args) {
      if(args.result == "OK") { 
    return modal;

  function timeRangeSelected(start, end, resource) {
    var modal = dialog();
    modal.showUrl("New.aspx?start=" + start.toStringSortable() + "&end=" + end.toStringSortable() + "&r=" + resource + "&hash=<%= PageHash %>");


    TimeRangeSelectedJavaScript="timeRangeSelected(start, end, resource)"        
Comment posted by Jeff
9 months ago.

Thank you! The part I was missing was the "ClientObjectName" attribute -- the other examples I found didn't show that, and I couldn't figure out where the "dps1" reference came from.

I appreciate the help.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.