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

Using Bootstrap modal instead of DayPilot Modal

Asked by Arnold
5 years ago.

I am new at DayPilot and I would like to keep the same theme across my application. I would like to find out if I can use my bootstrap modal in place of the DayPilot modal as I want to keep the same theme across my application. Is it possible? If yes, how?

Answer posted by Dan Letecky [DayPilot]
5 years ago.

Yes, this is no problem. The DayPilot Modal is just an optional helper.

This example shows how you can use DayPilot.Modal to ask for description when creating a new event:

  onTimeRangeSelected: function (args) {
    var dp = this;
    DayPilot.Modal.prompt("Create a new event:", "Event 1").then(function(modal) {
      dp.clearSelection();
      if (!modal.result) { return; }
      dp.events.add(new DayPilot.Event({
        start: args.start,
        end: args.end,
        id: DayPilot.guid(),
        resource: args.resource,
        text: modal.result
      }));
    });
  },

You can see that it's not hardwired and you can easily replace it with any other modal dialog implementation. The same applies to editing (see the onEventClick event).

Let me know if it doesn't help.

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