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

Open PopUp when selecting a timerange

Asked by ferran
3 years ago.

Good morning,

I would like to show a popup when selecting a timerange

What I have now >>

I configured the calendar in order that along the 12 months I have different groups (Holidays, Days to work on weekends, ...)

so the user can select the holidays, or the "days to work on weekends"
>> I have those 2 groups showing in same calendar

The idea is the next >>

when I select a range it sends an SQL Query to check if the group (depending if is a Holidays, or Days to work on weekends,...) requires to upload a document

then a popup would be showed to upload the document and after it the daterange would be recorded to the database

!!! The problem is

when it enters in the function TimeRangeSelected (aspx.vb) visual basic .net code

I tried to change the class of the div and or panel (tried both), or change thevisibility property

but it doesn't reflect the change in the DOM

Can you guide me to make it work?

cordially,
Ferran

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

There are three possible strategies that you can use for modal dialog in ASP.NET WebForms:

1. Use UpdatePanel and ModalPopupExtender:
https://code.daypilot.org/75958/scheduler-and-modalpopupextender-asp-net-c-vb-net

This is a legacy solution and it's not recommended. The UpdatePanel and ModalPopupExtender have a lot of quirks.

2. Open a standalone page using DayPilot.Modal. This approach is used in the Hotel tutorial:
https://code.daypilot.org/48275/hotel-room-booking-asp-net-c-vb-sql-server

When using this approach you can make changes to the page (e.g. refresh the Scheduler) in onClosed/close event handler of DayPilot.Modal. I recommend checking the tutorial for a working example.

3. Use DayPilot.Modal and define the modal content programmatically:
https://code.daypilot.org/60913/javascript-scheduler-edit-multiple-fields-modal-dialog

This only allows selected input field types and it doesn't support uploading files.

Please 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.