Xamarin.Plugin.Calendar 1.0.2.36

There is a newer version of this package available.
See the version list below for details.
dotnet add package Xamarin.Plugin.Calendar --version 1.0.2.36                
NuGet\Install-Package Xamarin.Plugin.Calendar -Version 1.0.2.36                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Xamarin.Plugin.Calendar" Version="1.0.2.36" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xamarin.Plugin.Calendar --version 1.0.2.36                
#r "nuget: Xamarin.Plugin.Calendar, 1.0.2.36"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Xamarin.Plugin.Calendar as a Cake Addin
#addin nuget:?package=Xamarin.Plugin.Calendar&version=1.0.2.36

// Install Xamarin.Plugin.Calendar as a Cake Tool
#tool nuget:?package=Xamarin.Plugin.Calendar&version=1.0.2.36                

Calendar Plugin for Xamarin.Forms

Build status Nuget Issues Chat License

Android iPhone
Android Calendar Screenshot iPhone Calendar Screenshot

Simple cross platform plugin for Calendar control featuring:

  • Displaying events by binding EventCollection
  • Localization support with System.Globalization.CultureInfo
  • Customizeable colors, fonts and sizes (WIP).

Setup

Supported versions
Platform Version
Xamarin.Forms 3.0+
Xamarin.Android ?
Xamarin.iOS ?

Usage

To get started just install the package via Nuget into your shared and client projects. You can take a look on the sample app to get started or continue reading.

Reference the following xmlns to your page:

xmlns:controls="clr-namespace:Xamarin.Plugin.Calendar.Controls;assembly=Xamarin.Plugin.Calendar"

Basic control usage:

<controls:Calendar
        Month="5"
        Year="2019"
        VerticalOptions="FillAndExpand"
        HorizontalOptions="FillAndExpand">

Bindable properties:

  • Culture (CultureInfo)
  • Month (int)
  • Year (int)
  • Events (EventCollection - from package)
  • Custom colors, fonts, sizes ...
Binding events:

In your XAML, add the data template for events, and bind the events collection, example:

<controls:Calendar
        Events="{Binding Events}">
    <controls:Calendar.EventTemplate>
        <DataTemplate>
            <StackLayout
                Padding="15,0,0,0">
                <Label
                    Text="{Binding Name}"
                    FontAttributes="Bold"
                    FontSize="Medium" />
                <Label
                    Text="{Binding Description}"
                    FontSize="Small"
                    LineBreakMode="WordWrap" />
            </StackLayout>
        </DataTemplate>
    </controls:Calendar.EventTemplate>
</controls:Calendar>

In your ViewModel reference the following namespace:

using Xamarin.Plugin.Calendar.Models;

Add property for Events:

public EventCollection Events { get; private set; }

Initialize Events with your data:

Events = new EventCollection
{
    [DateTime.Now] = new List<EventModel>
    {
        new EventModel { Name = "Cool event1", Description = "This is Cool event1's description!" },
        new EventModel { Name = "Cool event2", Description = "This is Cool event2's description!" }
    },
    // 5 days from today
    [DateTime.Now.AddDays(5)] = new List<EventModel>
    {
        new EventModel { Name = "Cool event3", Description = "This is Cool event3's description!" },
        new EventModel { Name = "Cool event4", Description = "This is Cool event4's description!" }
    },
    // 3 days ago
    [DateTime.Now.AddDays(-3)] = new List<EventModel>
    {
        new EventModel { Name = "Cool event5", Description = "This is Cool event5's description!" }
    }
},

Where EventModel is just an example, it can be replaced by any data model you desire.

EventsCollection is just a wrapper over Dictionary<DateTime, ICollection> exposing custom Add method and this[DateTime] indexer which internally extracts the .Date component of DateTime values and uses it as a key in this dictionary.

Available color customization

Sample properties:

MonthLabelColor="Red"
YearLabelColor="Blue"
SelectedDateColor="Red"
SelectedDayBackgroundColor="DarkCyan"
EventIndicatorColor="Red"
EventIndicatorSelectedColor="White"
ArrowsColor="DarkCyan"
DaysTitleColor="Orange"
SelectedDayTextColor="Cyan"
DeselectedDayTextColor="Blue"
OtherMonthDayColor="Gray"
TODO
  • screenshot of changed colors
  • Test Install into your PCL /.NET Standard project and Client projects.
  • comment public properties and methods
  • More customization, sizes, fonts etc.

Josip Ćaleta @lilcodelab

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed.  monoandroid70 is compatible.  monoandroid71 is compatible.  monoandroid80 is compatible.  monoandroid81 is compatible. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed.  xamarinios10 is compatible. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.9699 60,565 3/16/2022
1.4.5304 60,644 7/8/2021
1.2.2936 37,843 10/22/2020
1.2.1506 15,736 7/21/2020
1.2.1411 10,937 5/31/2020
1.2.1081 3,751 3/24/2020
1.1.1002 813 3/9/2020
1.1.925 2,157 2/24/2020
1.1.854 687 2/23/2020 1.1.854 is deprecated because it has critical bugs.
1.1.853 695 2/23/2020 1.1.853 is deprecated because it has critical bugs.
1.0.3.200 3,792 8/19/2019
1.0.3.83 924 7/18/2019
1.0.3.67 540 7/9/2019
1.0.3.66 500 7/9/2019
1.0.3.44 642 6/6/2019
1.0.3.43 584 6/5/2019
1.0.3.42 781 5/26/2019
1.0.3.40 549 5/22/2019
1.0.2.38 563 5/21/2019
1.0.2.37 558 5/20/2019
1.0.2.36 596 5/10/2019
1.0.2.35 621 5/5/2019