Jump to content

Recommended Posts

Posted

Hello, to all.

Is any way to set a CalendarPanel "readOnly" ?

I want to develop an application that only shows the events to the web user.

I don't want the user to interact with CalendarPanel  (like resize, move, or other actions).

I am using Delphi 10.2 and uniGUI 1.50.0.1481.

 

Thank you and stay safe !

 

 

PS. The following, doesn't seem to work.

 

 

Posted
2 hours ago, Sherzod said:

Hello,

Can you upgrade to the latest build?

Hello dear Sherzod.

The upgrade to the latest build, of course, is into my next future goals.

I am one of the oldest UniGui users and now, I am just try to enter again into Delphi web development.

The CalendarPanel is a proof of concept for a potential project.

 

Posted
54 minutes ago, lema said:

The CalendarPanel is a proof of concept for a potential project.

Hello!

I will try one of these days to install your build and check.

Posted

 

13 minutes ago, Sherzod said:

Hello!

I will try one of these days to install your build and check.

Thank you !

 

 

Actually, I can't figure out where to put this code....

 

UniCalendarPanel1 -> ClientEvents -> ExtEvents ...

function eventmove(sender, rec, eOpts)
{
  return false
}

 

 

 

Posted

Hello !
Although, I can suspend the events via : 

UniSession.AddJS(UniCalendarPanel1.JSName + '.events.eventmove.suspend()');

I would like to set whole component into ReadOnly mode.
My will is not to leave user to interact with CalendarPanel.
Is that possible?

Running on latest uniGUI v.1.90.0.1537 (Delphi 10.2).

Posted

Hello again. 

In case that it can't be set "readonly", is there any other workaround? 

eg. How can I drop a transparent mask or panel in front of the calendarpanel?

  • 6 months later...
  • 3 years later...
Posted

Hi,
I did:
 

procedure TForm1.calPaneEventMove(
  Sender: TUniCalendarPanel; AEventId: Integer; AEvent: TUniCalendarEvent;
  AStartDate, AEndDate: TDateTime; var Handled: Boolean);
begin
  Handled := true; //blocking of block move
end;

procedure TForm1.calPaneEventResize(
  Sender: TUniCalendarPanel; AEventId: Integer; AEvent: TUniCalendarEvent;
  AStartDate, AEndDate: TDateTime; var Handled: Boolean);
begin
  Handled := true;  //blocking of block resize
end;

and when I move or resize, it goes back to its previous position.

  • 6 months later...
Posted
On 7/24/2024 at 10:42 AM, Joseph Joestar said:

Hi,
I did:
 

procedure TForm1.calPaneEventMove(
  Sender: TUniCalendarPanel; AEventId: Integer; AEvent: TUniCalendarEvent; AStartDate, AEndDate: TDateTime; var Handled: Boolean);
begin
  Handled := true; //blocking of block move
end;

....

and when I move or resize, it goes back to its previous position.

Hello !
I'm also using the solution with Handled := true,
but is there a way to completely prevent resizing or moving the event?

Posted

I'm replying to myself...

The only thing I could find is the following. It seems to meet my needs.

 

.x-calendar-event {
    pointer-events: none !important;
}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...