valincius / blazorscheduler Goto Github PK
View Code? Open in Web Editor NEWScheduler built with Blazor
Home Page: https://valincius.github.io/BlazorScheduler/
License: MIT License
Scheduler built with Blazor
Home Page: https://valincius.github.io/BlazorScheduler/
License: MIT License
Hey as youre doing such a great work i wanted to share an improvement idea with you.
Is it possible to integrate a new feature to show the "other" appointments of a day by hovering the mouse over the day ?
Without the need of the additional dialog.
As I stumbled upon you neat component, I noticed there is only one view available at the moment.
Other scheduler components from suites like syncfusion, telerik, devexpress etc have day, week, month views with appointment templates to customize their content and appearance.
Are you planning on adding those in the (near) future or are you open for PR's for example?
I know how to change text on TodayButton:
<Scheduler @ref="scheduler" OnAddingNewAppointment="OnAddingNewAppointment" OnRequestNewData="OnRequestNewData" EnableRescheduling="true" TodayButtonText="I dag" MaxVisibleAppointmentsPerDay="1">
But how do I do that on DraggingAppointment new appointment?
Sorry for al these newbee questions and THANKS for your answers!
Hi, first of all i really appreciate your work.
Its a nice component.
It would be nice to have drag and drop support for appointments to reschedule them.
Need to call Scheduler.Invalidate
after making a change to an appointment's start & end date so it's reflected in the scheduler.
Currently the app just does nothing when you attempt to drag an appointment when OnReschedule is null, this is confusing
Describe the bug
Unable to set different start month for scheduler.
In my condition I don't want all time scheduler (Calendar) to load current month.
Having the color as a Color and not string causes issues when trying to persist with Entity Framework.
Changing to string will allow us to save the color directly instead of having to convert it.
Will you be upgrading this repo to NET6 when it is released?
Hope you would help me with some sample code that can change the date that the calendar shows on startup.
I do understand your sample with custom buttons, but how do I do it in code.
I read some data and then I would like to choose the date I show in the calendar for the user to start with.
Describe the bug
When MaxVisibleAppointmentsPerDay > 5 then the appointments after that will be covered by the next row, since the height of the row does not adjust accordingly.
To Reproduce
Steps to reproduce the behavior:
Additional context
Already fixed here: #56
Is there any way to override css to specific components? Like remove border-right from days or something?
This component works great for my usecase, however I was wondering if you planned on implementing a static calendar view config option? I currently need to be able to allow an administrator to schedule through the calendar, but also allow users to view the calendar without being able to add appointments. It seems that currently it is not possible to disable the onClick being triggered by clicking on days of the week.
Looks like your documentation is out of date. Appointment does not contain a Title property.
Hi,
I have implemented a function within the Scheduler class to prevent the creation of overlapping appointments. The CheckAppointmentOverlap method checks if a given date falls within the range of existing appointments. By calling this function, I can ensure that appointments do not overlap when initiating a drag operation.
However, I am currently facing challenges in preventing the ability to end an appointment on an existing appointment.
public bool CheckAppointmentOverlap(DateTime date) { foreach (var existingAppointment in _appointments) { // Check if the given date falls within the existing appointment range if (date >= existingAppointment.Start.Date && date <= existingAppointment.End.Date) { return true; // Overlap detected } } return false; // No overlap }
and call it from here:
`
public void BeginDrag(SchedulerDay day)
{
if (!EnableAppointmentsCreationFromScheduler)
return;
if (_appointments.IsNotEmpty())
{
if (CheckAppointmentOverlap(day.Day))
{
return;
}
}
_draggingStart = _draggingEnd = day.Day;
_showNewAppointment = true;
_draggingAppointmentAnchor = _draggingStart;
StateHasChanged();
}
`
Any idea how to prevent that?
Hey, could you update nuget packet with the last changes? I would love to continue my work on my main project with the scheduler that includes new features :)
Feature-Request: Implement a "working week view"
Add localization/customization capabilities for all strings.
When I add appointments, from 13.00 till 14.00 for example, I always see the title with de start and end time. Is there a way to remove the times and just show the title? It kinda sits in the way with my implementation.
This data is not shown for full-day appointments, but I don't have these.
Thank you.
Describe the bug
A clear and concise description of what the bug is.
If there are 6 or more appointments such that the UI says "+X others," I do not see a way to view these appointments. I have tried clicking the text etc.
To Reproduce
Steps to reproduce the behavior:
Go to the demo: https://valincius.dev/BlazorScheduler/day/ and add two appointments to one of the days with four. You will be unable to view the extra appointments
Expected behavior
A clear and concise description of what you expected to happen.
There should be a way of viewing the extra appointments.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
My apologies if there is a way of doing this already but I have not been able to find one! :)
Is your feature request related to a problem? Please describe.
Not a problem
Describe the solution you'd like
Same as Today button?
Describe alternatives you've considered
Additional context
You wrote to me:
There is actually not a config value for this one. It should be a really quick change, if you want to submit a PR for it. I do not think I'll be able to get around to it this week.
When displaying many appointments, the performance degrades pretty quickly
BlazorScheduler.Core
BlazorScheduler.Core.IAppointment
Scheduler
(and all other components)OnAppointmentClick
callbackOnDayClick
Appointment
component
<Scheduler />
OnClick
callback replaces Scheduler.OnAppointmentClick
ChildContent
is rendered on the appointment instead of text, allowing for more customizabilityColor
is now a string rather than System.Drawing.Color
MouseEventArgs
removed from their argumentsThemeColor
& StartDayOfWeek
to Config
ThemeColor
is now a stringInvalidate
method to Scheduler
OnRequestNewData
action
A question:
What CSS are you using with this component . I am going to try using it alongside MUDBlazor
thanks
Kevin
Describe the bug
After installing BlazorScheduler on my blazor server project, I seem to be running into a rendering problem at runtime. The exact error I ran into is the following:
An unhandled exception occurred while processing the request.
InvalidOperationException: JavaScript interop calls cannot be issued at this time. This is because the component is being statically rendered. When prerendering is enabled, JavaScript interop calls can only be performed during the OnAfterRenderAsync lifecycle method.
How should I adress this problem?
To Reproduce
Steps to reproduce the behavior:
dotnet run
commandExpected behavior
No errors at runtime and my BlazorScheduler component correctly rendered.
Additional context
N.A.
The days in the header are coming overflowing outside of the element
Describe the bug
Since the last update changed the heights of the weeks, the calculation for the Y offset is incorrect.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Appointment should stick close to the cursor
Describe the bug
Properly not a bug, just me not understanding how to get started.
Your project solution work fine. But when I do a new project and follow the few step from the readme file the blazor app is not running proberly. It compiles without errors. Only runtime error
I did not copy the scripts.js to a folder? is your package doing that for me?
To Reproduce
New blazor webasm project.
steps from readme
(and I did Add <script src="_content/BlazorScheduler/js/scripts.js"></script> to the body
Expected behavior
Was not expecting "crash" on page
Screenshots
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Could not find 'BlazorScheduler.attachSchedulerMouseEventsHandler' ('BlazorScheduler' was undefined).
Error: Could not find 'BlazorScheduler.attachSchedulerMouseEventsHandler' ('BlazorScheduler' was undefined).
at https://localhost:4201/_framework/blazor.webassembly.js:1:328
at Array.forEach ()
at a.findFunction (https://localhost:4201/_framework/blazor.webassembly.js:1:296)
at _ (https://localhost:4201/_framework/blazor.webassembly.js:1:2437)
at https://localhost:4201/_framework/blazor.webassembly.js:1:3325
at new Promise ()
at Object.beginInvokeJSFromDotNet (https://localhost:4201/_framework/blazor.webassembly.js:1:3306)
at Object.St [as invokeJSFromDotNet] (https://localhost:4201/_framework/blazor.webassembly.js:1:59853)
at _mono_wasm_invoke_js_blazor (https://localhost:4201/_framework/dotnet.6.0.5.7ue9mewvww.js:1:195300)
at wasm://wasm/00971e46:wasm-function[219]:0x1a490
Microsoft.JSInterop.JSException: Could not find 'BlazorScheduler.attachSchedulerMouseEventsHandler' ('BlazorScheduler' was undefined).
Error: Could not find 'BlazorScheduler.attachSchedulerMouseEventsHandler' ('BlazorScheduler' was undefined).
at https://localhost:4201/_framework/blazor.webassembly.js:1:328
at Array.forEach ()
at a.findFunction (https://localhost:4201/_framework/blazor.webassembly.js:1:296)
at _ (https://localhost:4201/_framework/blazor.webassembly.js:1:2437)
at https://localhost:4201/_framework/blazor.webassembly.js:1:3325
at new Promise ()
at Object.beginInvokeJSFromDotNet (https://localhost:4201/_framework/blazor.webassembly.js:1:3306)
at Object.St [as invokeJSFromDotNet] (https://localhost:4201/_framework/blazor.webassembly.js:1:59853)
at _mono_wasm_invoke_js_blazor (https://localhost:4201/_framework/dotnet.6.0.5.7ue9mewvww.js:1:195300)
at wasm://wasm/00971e46:wasm-function[219]:0x1a490
at Microsoft.JSInterop.JSRuntime.d__16`1[[Microsoft.JSInterop.Infrastructure.IJSVoidResult, Microsoft.JSInterop, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at BlazorScheduler.Scheduler.AttachMouseHandler() in C:\Users\rune\Documents\Visual Studio 2022\BlazorScheduler-main\BlazorScheduler\Components\Scheduler.razor.cs:line 120
at BlazorScheduler.Scheduler.OnAfterRenderAsync(Boolean firstRender) in C:\Users\rune\Documents\Visual Studio 2022\BlazorScheduler-main\BlazorScheduler\Components\Scheduler.razor.cs:line 82
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
Desktop (please complete the following information):
Feature-Request: Make "Start of the week day" adjustable
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.