Skip to content

Scheduler component #6092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 87 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
23dc410
Scheduler component moved from 2.0 branch
stsrki Apr 13, 2025
73b5654
White toolbar
stsrki Apr 13, 2025
804ec6c
Docs
stsrki Apr 13, 2025
e977c23
Fix month view sizing
stsrki Apr 13, 2025
32d0b44
Top borders
stsrki Apr 13, 2025
db6fb12
Merge branch 'master' into dev-scheduler
stsrki Apr 14, 2025
053165c
Fix column sizing
stsrki Apr 14, 2025
4d07897
Refresh method
stsrki Apr 14, 2025
5be85f7
Drag Drop WIP
stsrki Apr 14, 2025
b2c3ff0
Merge branch 'master' into dev-scheduler
stsrki Apr 15, 2025
48502b8
New feature badge
stsrki Apr 15, 2025
1706f91
Add to nuget pack
stsrki Apr 15, 2025
d567e31
dragdrop WIP
stsrki Apr 15, 2025
48739b4
refactor drag drop
stsrki Apr 15, 2025
9f93011
Drop month items
stsrki Apr 15, 2025
9ae18dd
Draggable parameter
stsrki Apr 15, 2025
2e90369
Add SchedulerPropertyMapper
stsrki Apr 16, 2025
f34d195
Merge branch 'master' into dev-scheduler
stsrki Apr 16, 2025
c104ac7
DeletedOccurrences
stsrki Apr 16, 2025
bd381f6
Merge branch 'master' into dev-scheduler
stsrki Apr 16, 2025
b12fb83
Merge branch 'master' into dev-scheduler
stsrki Apr 17, 2025
e9cfd3e
treat DeleteOccurrenceImpl as an edit operation
stsrki Apr 17, 2025
ba6d3ae
Modify edit and delete logic
stsrki Apr 17, 2025
6c29d26
Merge branch 'master' into dev-scheduler
stsrki Apr 18, 2025
f32ccf3
Use mapper on modal
stsrki Apr 18, 2025
bfecbe2
Rename SchedulerItemModa
stsrki Apr 18, 2025
da80ef3
Edit occurrences
stsrki Apr 18, 2025
77af1d8
Null checks
stsrki Apr 18, 2025
b8abd44
Optimize recurrences
stsrki Apr 18, 2025
b8abede
Manage drag of recurring items
stsrki Apr 18, 2025
f3bc2b0
Saving dropped items
stsrki Apr 19, 2025
3e7da60
Delete logic fixed
stsrki Apr 19, 2025
ac4dcae
Merge branch 'master' into dev-scheduler
stsrki Apr 19, 2025
a7981c9
Semantics on delete
stsrki Apr 19, 2025
5ce58d5
xml comments
stsrki Apr 19, 2025
5d89437
Use TItem for passing items
stsrki Apr 19, 2025
bd17227
Drag allday items
stsrki Apr 19, 2025
d977453
Recurring allday items
stsrki Apr 20, 2025
d0651c6
Simlify SchedulerItemInfo constructors
stsrki Apr 20, 2025
fb7deab
drag area WIP
stsrki Apr 22, 2025
a456da0
Merge branch 'master' into dev-scheduler
stsrki Apr 22, 2025
cbf4a04
DragArea fix
stsrki Apr 22, 2025
91c2353
is null/is not null
stsrki Apr 22, 2025
6ba57a7
Comments
stsrki Apr 22, 2025
45cbc35
Add ShowWeekNumbers on month view
stsrki Apr 22, 2025
7626aac
Merge branch 'master' into dev-scheduler
stsrki Apr 23, 2025
5c723c5
Show Drag effect
stsrki Apr 23, 2025
d9d2815
Drag effect
stsrki Apr 23, 2025
1b03c13
Optimize fluent utilities allocations
stsrki Apr 26, 2025
08e4ba1
DropAllowed callback
stsrki Apr 26, 2025
5af1b25
Reconcile edit and delete events
stsrki Apr 26, 2025
4409f60
Bogus data faker
stsrki Apr 26, 2025
29aa9d9
Merge branch 'master' into dev-scheduler
stsrki May 2, 2025
1d91273
Rename DragArea and DragSection
stsrki May 2, 2025
bc599b9
Fix week view maxdate
stsrki May 2, 2025
63dab4f
ItemStyling
stsrki May 2, 2025
9fc551e
Add Fundamentals to the docs section
stsrki May 3, 2025
9f6ad49
Merge branch 'master' into dev-scheduler
stsrki May 6, 2025
44c9aa9
Use new Flex Basis utility
stsrki May 6, 2025
e96482c
Add missing Basis chain to IFluentFlexAll
stsrki May 6, 2025
f4cecaa
Overflow.Auto on day cell
stsrki May 7, 2025
50d0954
Show Primary color for selected buttons
stsrki May 7, 2025
8975be8
Fix modals naming
stsrki May 7, 2025
3182aad
Fix day of week calculation
stsrki May 7, 2025
adaf864
Fix bug with TimeOnly overflow
stsrki May 7, 2025
be4b745
Create AllDay item on slot click
stsrki May 7, 2025
e9552aa
Merge branch 'master' into dev-scheduler
stsrki May 8, 2025
a6afa8a
Missing localization and centralize constants
stsrki May 8, 2025
fcf6597
Value limitations
stsrki May 8, 2025
aec6cc7
Prevent saving of invalid RecurrenceRule
stsrki May 8, 2025
0fff983
Larger modal
stsrki May 8, 2025
8c21598
Trigger date localization
stsrki May 8, 2025
b944c39
Ability to close message on focus lost
stsrki May 8, 2025
cbadc02
Localization for validation messages
stsrki May 8, 2025
bc72962
Add ViewHeight parameter
stsrki May 8, 2025
24fd607
Add data attributes for start and end times
stsrki May 9, 2025
36fbdf8
Merge branch 'master' into dev-scheduler
stsrki May 14, 2025
f26d99d
ItemTemplate
stsrki May 15, 2025
5be8aeb
Add aria labels
stsrki May 15, 2025
f2c9a36
Fix json
stsrki May 15, 2025
034bec0
Merge branch 'master' into dev-scheduler
stsrki May 20, 2025
a04cf3e
Scheduler: Selection logic (#6098)
stsrki May 21, 2025
8e69b28
Merge branch 'master' into dev-scheduler
stsrki May 22, 2025
422cb8f
Editable default to false
stsrki May 22, 2025
f931f08
Examples
stsrki May 22, 2025
c655bbe
Editable demo
stsrki May 23, 2025
d88a3f6
Merge branch 'master' into dev-scheduler
stsrki Jun 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Blazorise.sln
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazorise.Weavers", "Source
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazorise.Weavers.Fody", "Source\SourceGenerators\Blazorise.Weavers.Fody\Blazorise.Weavers.Fody.csproj", "{FFC4A285-1A16-4DD4-8B8C-141521E405B0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blazorise.Scheduler", "Source\Extensions\Blazorise.Scheduler\Blazorise.Scheduler.csproj", "{E2582180-8E51-43E1-0943-588D720FCAB5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -423,6 +425,10 @@ Global
{FFC4A285-1A16-4DD4-8B8C-141521E405B0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FFC4A285-1A16-4DD4-8B8C-141521E405B0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FFC4A285-1A16-4DD4-8B8C-141521E405B0}.Release|Any CPU.Build.0 = Release|Any CPU
{E2582180-8E51-43E1-0943-588D720FCAB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2582180-8E51-43E1-0943-588D720FCAB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2582180-8E51-43E1-0943-588D720FCAB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E2582180-8E51-43E1-0943-588D720FCAB5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -495,6 +501,7 @@ Global
{EAB7EC89-900A-4280-B24A-152B9DD2B503} = {9731051E-0AA7-411E-A76A-987854F034DA}
{BF5FFB8C-45AD-4875-BB01-2DA388890419} = {0538DB67-B4F3-4D00-B969-D3874A52E405}
{FFC4A285-1A16-4DD4-8B8C-141521E405B0} = {0538DB67-B4F3-4D00-B969-D3874A52E405}
{E2582180-8E51-43E1-0943-588D720FCAB5} = {9731051E-0AA7-411E-A76A-987854F034DA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {205B3EA4-470F-45DA-911E-346AF7D0A9A5}
Expand Down
1 change: 1 addition & 0 deletions Build/Blazorise.Demo.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.10.0" />
<PackageReference Include="Flurl.Http" Version="4.0.0-pre2" />
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageReference Include="Bogus" Version="35.6.3" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions Demos/Blazorise.Demo/Blazorise.Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<ProjectReference Include="..\..\Source\Extensions\Blazorise.SignaturePad\Blazorise.SignaturePad.csproj" />
<ProjectReference Include="..\..\Source\Extensions\Blazorise.FluentValidation\Blazorise.FluentValidation.csproj" />
<ProjectReference Include="..\..\Source\Extensions\Blazorise.PdfViewer\Blazorise.PdfViewer.csproj" />
<ProjectReference Include="..\..\Source\Extensions\Blazorise.Scheduler\Blazorise.Scheduler.csproj" />
<ProjectReference Include="..\Apps\TodoApp\TodoApp.csproj" />
</ItemGroup>

Expand Down
3 changes: 2 additions & 1 deletion Demos/Blazorise.Demo/Components/SideMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@
<BarDropdownItem To="tests/qrcode">QR Code</BarDropdownItem>
<BarDropdownItem To="tests/repeater">Repeater</BarDropdownItem>
<BarDropdownItem To="tests/richtextedit">RichTextEdit</BarDropdownItem>
<BarDropdownItem To="tests/routertabs">Router Tabs</BarDropdownItem>
<BarDropdownItem To="tests/scheduler">Scheduler</BarDropdownItem>
<BarDropdownItem To="tests/selectlist">Select List</BarDropdownItem>
<BarDropdownItem To="tests/signaturepad">SignaturePad</BarDropdownItem>
<BarDropdownItem To="tests/snackbar">Snackbar</BarDropdownItem>
Expand All @@ -317,7 +319,6 @@
<BarDropdownItem To="tests/transferlist">Transfer List</BarDropdownItem>
<BarDropdownItem To="tests/treeview">TreeView</BarDropdownItem>
<BarDropdownItem To="tests/video">Video</BarDropdownItem>
<BarDropdownItem To="tests/routertabs">Router Tabs</BarDropdownItem>
</BarDropdownMenu>
</BarDropdown>
</BarItem>
Expand Down
140 changes: 140 additions & 0 deletions Demos/Blazorise.Demo/Pages/Tests/SchedulerPage.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
@page "/tests/scheduler"
@using Bogus
<Row>
<Column>
<Card Margin="Margin.Is4.OnY">
<CardHeader>
<CardTitle>Scheduler</CardTitle>
</CardHeader>
<CardBody>
<Scheduler TItem="SchedulerAppointment" @bind-Date="@selectedDate"
Data="@Appointments"
@bind-SelectedView="@selectedView"
Editable
Draggable
ItemStyling="@OnItemStyling"
SlotSelectionMode="SchedulerSlotSelectionMode.Mouse">
<SchedulerToolbar />
<SchedulerViews>
<SchedulerDayView StartTime="@(new TimeOnly( 7, 0 ))" EndTime="@(new TimeOnly( 17, 0 ))" WorkDayStart="@(new TimeOnly( 8, 0 ))" WorkDayEnd="@(new TimeOnly( 16, 0 ))" />
<SchedulerWeekView StartTime="@(new TimeOnly( 7, 0 ))" EndTime="@(new TimeOnly( 17, 0 ))" WorkDayStart="@(new TimeOnly( 8, 0 ))" WorkDayEnd="@(new TimeOnly( 16, 0 ))" />
<SchedulerWorkWeekView StartTime="@(new TimeOnly( 7, 0 ))" EndTime="@(new TimeOnly( 17, 0 ))" WorkDayStart="@(new TimeOnly( 8, 0 ))" WorkDayEnd="@(new TimeOnly( 16, 0 ))" />
<SchedulerMonthView StartTime="@(new TimeOnly( 7, 0 ))" EndTime="@(new TimeOnly( 17, 0 ))" WorkDayStart="@(new TimeOnly( 8, 0 ))" WorkDayEnd="@(new TimeOnly( 16, 0 ))" />
</SchedulerViews>
</Scheduler>
</CardBody>
</Card>
</Column>
</Row>
<Row>
<Column>
Selected date: @selectedDate
</Column>
</Row>
@code {
[Inject] IMessageService MessageService { get; set; }
private DateOnly selectedDate = DateOnly.FromDateTime( DateTime.Today );
private SchedulerView selectedView = SchedulerView.Week;

private static DateTime start = DateTime.Today.AddHours( 10 );

private Faker<SchedulerAppointment> appointmentFaker = new Faker<SchedulerAppointment>()
.RuleFor( a => a.Title, f => f.Lorem.Sentence( 3 ) )
.RuleFor( a => a.Description, f => f.Lorem.Paragraph() );

private Task OnSlotClicked( SchedulerSlotClickedEventArgs eventArgs )
{
var start = eventArgs.Start;
var end = eventArgs.End;

var fakeAppointment = appointmentFaker.Generate();
fakeAppointment.Start = start;
fakeAppointment.End = end;

Appointments.Add( fakeAppointment );

return Task.CompletedTask;
}

private async Task<bool> IsDropAllowed( SchedulerDragEventArgs<SchedulerAppointment> eventArgs )
{
await MessageService.Warning( "You cannot drop this appointment here", "Drop not allowed" );

return false;
}

private void OnItemStyling( SchedulerAppointment appointment, SchedulerItemStyling itemStyling )
{
if ( appointment.Title.Contains( "ceo", StringComparison.OrdinalIgnoreCase ) )
itemStyling.Background = Background.Danger;
else if ( appointment.Title.Contains( "client", StringComparison.OrdinalIgnoreCase ) )
itemStyling.Background = Background.Success;
else if ( appointment.Title.Contains( "lunch", StringComparison.OrdinalIgnoreCase ) )
itemStyling.Background = Background.Info;
}

public class SchedulerAppointment
{
public SchedulerAppointment()
{
}

public SchedulerAppointment( string title, string description, DateTime start, DateTime end, bool allDay = false )
{
Id = Guid.NewGuid().ToString();
Title = title;
Description = description;
Start = start;
End = end;
AllDay = allDay;
}

public SchedulerAppointment( string id, string title, string description, DateTime start, DateTime end, bool allDay = false )
{
Id = id;
Title = title;
Description = description;
Start = start;
End = end;
AllDay = allDay;
}

public string Id { get; set; }

public string Title { get; set; }

public string Description { get; set; }

public DateTime Start { get; set; }

public DateTime End { get; set; }

public bool AllDay { get; set; }

public string RecurrenceRule { get; set; }

public string RecurrenceId { get; set; }

public List<DateTime> DeletedOccurrences { get; set; }

public DateTime? OriginalStart { get; set; }

public List<SchedulerAppointment> RecurrenceExceptions { get; set; }
}

List<SchedulerAppointment> Appointments = new List<SchedulerAppointment>
{
new SchedulerAppointment( "Meeting with the CEO", "Regarding the new margeting strategy", start, start.AddHours(1) ),
new SchedulerAppointment( "Some other meeting", "Regarding the new margeting strategy", start, start.AddHours(1) ),
new SchedulerAppointment( "Lunch with the team", "Discussing the new project", start.AddDays(-10).AddHours(2), start.AddDays(-10).AddHours(3))
{
RecurrenceRule = "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;INTERVAL=2;COUNT=3"
// RecurrenceRule = "FREQ=DAILY;INTERVAL=1;COUNT=10;"
// RecurrenceRule = "FREQ=MONTHLY;INTERVAL=2;BYMONTHDAY=1;COUNT=2;"
},
new SchedulerAppointment( "Meeting with the client", "Discussing the new project", start.AddHours(4), start.AddHours(5) ),
new SchedulerAppointment( "Test 1", "Test 1 desc", DateTime.Today.AddDays(-2), DateTime.Today.AddDays(-2), true ),
new SchedulerAppointment( "All day event with the team", "Team building", DateTime.Today.AddDays(-2), DateTime.Today, true),
new SchedulerAppointment( "Games with the team", "Having fun", DateTime.Today, DateTime.Today, true ),
};
}
1 change: 1 addition & 0 deletions Demos/Blazorise.Demo/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@
@using Blazorise.Shared.Models
@using Blazorise.SignaturePad
@using Blazorise.PdfViewer
@using Blazorise.Scheduler
@using TodoApp
1 change: 1 addition & 0 deletions Documentation/Blazorise.Docs/Blazorise.Docs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<ProjectReference Include="..\..\Source\Extensions\Blazorise.SignaturePad\Blazorise.SignaturePad.csproj" />
<ProjectReference Include="..\..\Source\Extensions\Blazorise.Splitter\Blazorise.Splitter.csproj" />
<ProjectReference Include="..\..\Source\Extensions\Blazorise.PdfViewer\Blazorise.PdfViewer.csproj" />
<ProjectReference Include="..\..\Source\Extensions\Blazorise.Scheduler\Blazorise.Scheduler.csproj" />
<PackageReference Include="MailKit" Version="4.8.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.*" />
<PackageReference Include="MimeKit" Version="4.8.0" />
Expand Down
3 changes: 3 additions & 0 deletions Documentation/Blazorise.Docs/Layouts/DocsLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@
<BarDropdownItem To="docs/extensions/routertabs" Flex="Flex.JustifyContent.Between">
<DocsNewFeatureBadge>RouterTabs</DocsNewFeatureBadge>
</BarDropdownItem>
<BarDropdownItem To="docs/extensions/scheduler" Flex="Flex.JustifyContent.Between">
<DocsNewFeatureBadge>Scheduler</DocsNewFeatureBadge>
</BarDropdownItem>
<BarDropdownItem To="docs/extensions/selectlist">SelectList</BarDropdownItem>
<BarDropdownItem To="docs/extensions/sidebar">Sidebar</BarDropdownItem>
<BarDropdownItem To="docs/extensions/signaturepad">SignaturePad</BarDropdownItem>
Expand Down
Loading
Loading