Okay I am at a loss now. I have followed the instructions on running SSR and the dialog still does not pop up the form for editing/adding an appointment on the scheduler. I have even disabled popups on this site just in case. I looked in the console and there are no errors. Any other suggestions?
I just tried using the tooltip demo as well and no tooltip is working. Here is my setup:
App.razor Page:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="TestAPP.Discard.styles.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<link rel="stylesheet" href="_content/Radzen.Blazor/css/material-base.css">
<HeadOutlet />
</head>
<body>
<Routes />
<script src="_framework/blazor.web.js"></script>
<script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>
</body>
</html>
_imports page
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using TestAPP.Discard
@using TestAPP.Discard.Client
@using TestAPP.Discard.Components
@using TestAPP.Discard.Data
@using Radzen.Blazor
@using Radzen
Program cs page:
using Radzen;
using TestAPP.Discard.Client.Pages;
using TestAPP.Discard.Components;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents()
.AddInteractiveWebAssemblyComponents();
builder.Services.AddRadzenComponents();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseWebAssemblyDebugging();
}
else
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
// The default HSTS value is 30 days. You may want to change this for production scenarios, see Enforce HTTPS in ASP.NET Core | Microsoft Learn.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseAntiforgery();
app.MapRazorComponents()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
.AddAdditionalAssemblies(typeof(Counter).Assembly);
app.Run();
Schedule.razor page
@page "/schedule"
@inject TooltipService TooltipService
@rendermode InteractiveServer
<RadzenScheduler style="height: 768px;" TItem="Appointment" Data=@appointments StartProperty="Start" EndProperty="End"
TextProperty="Text" SelectedIndex="2" AppointmentMouseEnter=@OnAppointmentMouseEnter AppointmentMouseLeave=@OnAppointmentMouseLeave>
<RadzenDayView />
<RadzenWeekView />
<RadzenMonthView />
<RadzenYearView />
</RadzenScheduler>
@code {
IList<Appointment> appointments = new List<Appointment>
{
new Appointment { Start = DateTime.Today.AddDays(-2), End = DateTime.Today.AddDays(-2), Text = "Birthday" },
new Appointment { Start = DateTime.Today.AddDays(-11), End = DateTime.Today.AddDays(-10), Text = "Day off" },
new Appointment { Start = DateTime.Today.AddDays(-10), End = DateTime.Today.AddDays(-8), Text = "Work from home" },
new Appointment { Start = DateTime.Today.AddHours(10), End = DateTime.Today.AddHours(12), Text = "Online meeting" },
new Appointment { Start = DateTime.Today.AddHours(10), End = DateTime.Today.AddHours(13), Text = "Skype call" },
new Appointment { Start = DateTime.Today.AddHours(14), End = DateTime.Today.AddHours(14).AddMinutes(30), Text = "Dentist appointment" },
new Appointment { Start = DateTime.Today.AddDays(1), End = DateTime.Today.AddDays(12), Text = "Vacation" },
};
void OnAppointmentMouseEnter(SchedulerAppointmentMouseEventArgs<Appointment> args)
{
TooltipService.Open(args.Element, ts =>
@<RadzenStack Orientation="Orientation.Vertical" Gap="0" Class="rz-p-6" Style="min-width: 250px; max-width: 500px;">
<RadzenText TextStyle="TextStyle.H4" Class="rz-mb-4" Style="color: var(--rz-tooltip-color);">
@args.Data.Text
</RadzenText>
<RadzenStack Orientation="Orientation.Horizontal" Gap="4px">
<RadzenText TextStyle="TextStyle.Body2" Style="color: var(--rz-tooltip-color); width: 44px;">
<strong>Start</strong>
</RadzenText>
<RadzenText TextStyle="TextStyle.Body2" Style="color: var(--rz-tooltip-color);">
@args.Data.Start.ToString("hh:mm ⋅ dddd, MMMM d")
</RadzenText>
</RadzenStack>
<RadzenStack Orientation="Orientation.Horizontal" Gap="4px">
<RadzenText TextStyle="TextStyle.Body2" Style="color: var(--rz-tooltip-color); width: 44px;">
<strong>End</strong>
</RadzenText>
<RadzenText TextStyle="TextStyle.Body2" Style="color: var(--rz-tooltip-color);">
@args.Data.End.ToString("hh:mm ⋅ dddd, MMMM d")
</RadzenText>
</RadzenStack>
</RadzenStack>, new TooltipOptions { Position = TooltipPosition.Right, Duration = null });
}
void OnAppointmentMouseLeave(SchedulerAppointmentMouseEventArgs<Appointment> args)
{
TooltipService.Close();
}
}
I don't know what I am missing here. Neither the tool tip or the dialog are working.