Giter Club home page Giter Club logo

blazorscheduler's People

Contributors

dependabot[bot] avatar francescorepo avatar lewan24 avatar valincius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

blazorscheduler's Issues

Show "Others" Appointments by MouseHover

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.

Extra scheduler views

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?

Change text on New Appointment/DraggingAppointment

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!

Drag and Drop for Appointments

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.

Change color to be a string

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.

NET 6

Will you be upgrading this repo to NET6 when it is released?

Help for setting startup date

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.

Appointments covered by next row when MaxVisibleAppointmentsPerDay > 5

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:

  1. Set MaxVisibleAppointmentsPerDay to 7
  2. Add 7 appointments

Additional context
Already fixed here: #56

Override css

Is there any way to override css to specific components? Like remove border-right from days or something?

Static Calendar View?

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.

How to prevent overlap appoitments?

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();

}
`

image

Any idea how to prevent that?

Nuget update

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: "Working Week View"

Feature-Request: Implement a "working week view"

  • Package would be usefuller, if it would be possible to configure have an view/option to just show the work week days from Monday till Friday

Localization support

Add localization/customization capabilities for all strings.

  • Month name
  • Day name
  • Today button
  • "+ n others"

Remove start and end time?

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.

Unable to view extra appointments

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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

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.

image

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
My apologies if there is a way of doing this already but I have not been able to find one! :)

Custom text for DraggingAppointment "new appointment"

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.

Poor performance with > 100 appointments in view

When displaying many appointments, the performance degrades pretty quickly

  • Optimize which components should be redrawn
  • Optimize logic to only perform calculations on the days/appointments that are being affected
  • Only iterate appointments once instead of once per each week in the month ?

Release 3.0.0

Changes

  • Deprecates/Removes BlazorScheduler.Core
    • Removes the need for having your model implement BlazorScheduler.Core.IAppointment
      • Appointments are now components that may be changed dynamically without modifying the original reference
  • Typeparam removed from Scheduler (and all other components)
  • Removes OnAppointmentClick callback
  • Removes OnDayClick
  • Day number is no longer clickable by default
  • Adds Appointment component
    • This component should be rendered under a <Scheduler />
    • OnClick callback replaces Scheduler.OnAppointmentClick
    • ChildContent is rendered on the appointment instead of text, allowing for more customizability
    • Color is now a string rather than System.Drawing.Color
  • Callbacks have all had MouseEventArgs removed from their arguments
  • Moves ThemeColor & StartDayOfWeek to Config
  • ThemeColor is now a string
  • The header can now be templated (see demo)
  • The day component can now be templated (see demo)
  • Fixed weekday text to be truncated on smaller devices
  • Added configuration values for modifying the "Today" button and the text that shows for overflow appointments.
  • Added new demos to show the features and customizations
  • Day names are now localized
  • Added Invalidate method to Scheduler
    • This can be called to rerender child components incase you make updates to a template
      • Only necessary for day templates at the moment (see demo)
  • Added OnRequestNewData action
    • This is called on the first render & whenever the current date changes, so we can send a request and get the appointments for the current date range

Todo

  • Fix weekday text for small devices
  • Add ability to customize the header row (Today button, changing month)
  • Add ability to customize the Month and Day names, and the "+ n others" text
    • "+ n others"
    • Month names
    • Day names
  • Fix broken styling
  • Remove commented out code
  • New (better) demos
    • Base demo
    • Configuration demo
    • Interactions demo
    • Header template
    • Day template

CSS used ?

A question:

What CSS are you using with this component . I am going to try using it alongside MUDBlazor

thanks
Kevin

Rendering problem on my blazor server

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:

  1. Intalling bazorScheduler on my Blazor server
  2. Running my project with dotnet run command
  3. See error

Expected behavior
No errors at runtime and my BlazorScheduler component correctly rendered.

Screenshots
image

Additional context
N.A.

Y offset not calculated correctly when moving an appointment

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:

  1. Add appointments on a day until the week increases in height
  2. Drag one of the appointments to another week
  3. You'll see the appointment will not line up with your cursor

Expected behavior
Appointment should stick close to the cursor

'BlazorScheduler' was undefined

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):

  • OS: Win10x64
  • Browser Edge 101

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.