{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "scheduler-disabled-dates",
  "framework": "winforms",
  "type": "registry:component",
  "component": "Scheduler",
  "variant": "disabled-dates",
  "dependencies": [
    "Syncfusion.SfInput.WinForms"
  ],
  "description": "DateTime edit control that marks every weekend between minimum and maximum dates as a blackout date via the DisabledDates collection.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/winforms/llms.txt",
    "skillPack": "syncfusion/winforms-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/winforms/scheduler-disabled-dates.md"
  },
  "files": [
    {
      "target": "src/components/scheduler-disabled-dates/scheduler.Designer.cs",
      "content": "﻿#region Copyright Syncfusion Inc. 2001-2019.\n// Copyright Syncfusion Inc. 2001-2019. All rights reserved.\n// Use of this code is subject to the terms of our license.\n// A copy of the current license can be obtained at any time by e-mailing\n// licensing@syncfusion.com. Any infringement will be prosecuted under\n// applicable laws. \n#endregion\nusing Syncfusion.WinForms.Input.Events;\nusing System;\n\nnamespace DisabledDates\n{\n    partial class Form1\n    {\n        /// <summary>\n        /// Required designer variable.\n        /// </summary>\n        private System.ComponentModel.IContainer components = null;\n\n        /// <summary>\n        /// Clean up any resources being used.\n        /// </summary>\n        /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n        protected override void Dispose(bool disposing)\n        {\n            if (disposing && (components != null))\n            {\n                components.Dispose();\n            }\n            base.Dispose(disposing);\n        }\n\n        #region Windows Form Designer generated code\n\n        /// <summary>\n        /// Required method for Designer support - do not modify\n        /// the contents of this method with the code editor.\n        /// </summary>\n        private void InitializeComponent()\n        {\n            this.panel6 = new System.Windows.Forms.Panel();\n            this.panel2 = new System.Windows.Forms.Panel();\n            this.borderPanel1 = new System.Windows.Forms.Panel();\n            this.maxDateTimeEdit = new Syncfusion.WinForms.Input.SfDateTimeEdit();\n            this.label3 = new System.Windows.Forms.Label();\n            this.minDateTimeEdit = new Syncfusion.WinForms.Input.SfDateTimeEdit();\n            this.minDate_lbl = new System.Windows.Forms.Label();\n            this.label2 = new System.Windows.Forms.Label();\n            this.captionLbl = new System.Windows.Forms.Label();\n            this.sfCalendar = new Syncfusion.WinForms.Input.SfCalendar();\n            this.borderPanel1.SuspendLayout();\n            this.SuspendLayout();\n            // \n            // panel6\n            // \n            this.panel6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(238)))), ((int)(((byte)(238)))));\n            this.panel6.Dock = System.Windows.Forms.DockStyle.Right;\n            this.panel6.Location = new System.Drawing.Point(892, 0);\n            this.panel6.Name = \"panel6\";\n            this.panel6.Size = new System.Drawing.Size(1, 48);\n            this.panel6.TabIndex = 1;\n            // \n            // panel2\n            // \n            this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(238)))), ((int)(((byte)(238)))), ((int)(((byte)(238)))));\n            this.panel2.Dock = System.Windows.Forms.DockStyle.Top;\n            this.panel2.Location = new System.Drawing.Point(0, 48);\n            this.panel2.Name = \"panel2\";\n            this.panel2.Size = new System.Drawing.Size(893, 1);\n            this.panel2.TabIndex = 1;\n            // \n            // borderPanel1\n            // \n            this.borderPanel1.Controls.Add(this.maxDateTimeEdit);\n            this.borderPanel1.Controls.Add(this.label3);\n            this.borderPanel1.Controls.Add(this.minDateTimeEdit);\n            this.borderPanel1.Controls.Add(this.minDate_lbl);\n            this.borderPanel1.Controls.Add(this.label2);\n            this.borderPanel1.Controls.Add(this.captionLbl);\n            this.borderPanel1.Controls.Add(this.sfCalendar);\n            this.borderPanel1.Dock = System.Windows.Forms.DockStyle.Fill;\n            this.borderPanel1.Font = new System.Drawing.Font(\"Microsoft Sans Serif\", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.borderPanel1.ForeColor = System.Drawing.SystemColors.WindowText;\n            this.borderPanel1.Location = new System.Drawing.Point(0, 49);\n            this.borderPanel1.Name = \"borderPanel1\";\n            this.borderPanel1.Size = new System.Drawing.Size(893, 591);\n            this.borderPanel1.TabIndex = 2;\n            // \n            // maxDateTimeEdit\n            //             \n            this.maxDateTimeEdit.DateTimeEditingMode = Syncfusion.WinForms.Input.Enums.DateTimeEditingMode.Mask;\n            this.maxDateTimeEdit.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F);\n            this.maxDateTimeEdit.ForeColor = System.Drawing.Color.Black;\n            this.maxDateTimeEdit.Location = new System.Drawing.Point(671, 172);\n            this.maxDateTimeEdit.Margin = new System.Windows.Forms.Padding(2);\n            this.maxDateTimeEdit.Name = \"maxDateTimeEdit\";\n            this.maxDateTimeEdit.Size = new System.Drawing.Size(155, 29);\n            this.maxDateTimeEdit.TabIndex = 3;\n            // \n            // label3\n            // \n            this.label3.AutoSize = true;\n            this.label3.Font = new System.Drawing.Font(\"Segoe UI Semibold\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label3.Location = new System.Drawing.Point(556, 176);\n            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);\n            this.label3.Name = \"label3\";\n            this.label3.Size = new System.Drawing.Size(71, 20);\n            this.label3.TabIndex = 23;\n            this.label3.Text = \"MaxDate\";\n            // \n            // minDateTimeEdit\n            //             \n            this.minDateTimeEdit.DateTimeEditingMode = Syncfusion.WinForms.Input.Enums.DateTimeEditingMode.Mask;            \n            this.minDateTimeEdit.DropDownPopupAlignment = Syncfusion.WinForms.Input.Enums.DropDownPopupAlignment.Left;\n            this.minDateTimeEdit.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.minDateTimeEdit.Location = new System.Drawing.Point(671, 102);\n            this.minDateTimeEdit.Margin = new System.Windows.Forms.Padding(2);\n            this.minDateTimeEdit.Name = \"minDateTimeEdit\";\n            this.minDateTimeEdit.Size = new System.Drawing.Size(155, 29);\n            this.minDateTimeEdit.TabIndex = 2;\n            this.minDateTimeEdit.ValidationOption = Syncfusion.WinForms.Input.Enums.ValidationResetOption.Reset;\n            // \n            // minDate_lbl\n            // \n            this.minDate_lbl.AutoSize = true;\n            this.minDate_lbl.Font = new System.Drawing.Font(\"Segoe UI Semibold\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.minDate_lbl.Location = new System.Drawing.Point(555, 105);\n            this.minDate_lbl.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);\n            this.minDate_lbl.Name = \"minDate_lbl\";\n            this.minDate_lbl.Size = new System.Drawing.Size(68, 20);\n            this.minDate_lbl.TabIndex = 21;\n            this.minDate_lbl.Text = \"MinDate\";\n            this.minDate_lbl.TextAlign = System.Drawing.ContentAlignment.BottomCenter;\n            // \n            // label2\n            // \n            this.label2.AutoSize = true;\n            this.label2.Font = new System.Drawing.Font(\"Segoe UI\", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));\n            this.label2.Location = new System.Drawing.Point(178, 462);\n            this.label2.Name = \"label2\";\n            this.label2.Size = new System.Drawing.Size(0, 20);\n            this.label2.TabIndex = 20;\n            // \n            // captionLbl\n            // \n            this.captionLbl.AutoSize = true;\n            this.captionLbl.Font = new System.Drawing.Font(\"Segoe UI Semibold\", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n            this.captionLbl.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));\n            this.captionLbl.Location = new System.Drawing.Point(66, 462);\n            this.captionLbl.Margin = new System.Windows.Forms.Padding(10, 0, 3, 0);\n            this.captionLbl.Name = \"captionLbl\";\n            this.captionLbl.Size = new System.Drawing.Size(106, 20);\n            this.captionLbl.TabIndex = 19;\n            this.captionLbl.Text = \"Selected Date:\";\n            // \n            // sfCalendar\n            //\n            this.sfCalendar.Location = new System.Drawing.Point(70, 86);            \n            this.sfCalendar.Name = \"sfCalendar\";            \n            this.sfCalendar.NumberOfWeeksInView = 5;   \n            this.sfCalendar.ShowFooter = false;            \n            this.sfCalendar.Size = new System.Drawing.Size(420, 354);            \n            this.sfCalendar.TabIndex = 1;\n            this.sfCalendar.Text = \"sfCalendar1\";\n            this.sfCalendar.TrailingDatesVisible = false;\n            this.sfCalendar.SelectionChanged += new SelectionChangedEventHandler(this.sfCalendar_SelectionChanged);\n            // \n            // Form1\n            // \n            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n            this.BackColor = System.Drawing.Color.White;\n            this.ClientSize = new System.Drawing.Size(893, 640);\n            this.Controls.Add(this.borderPanel1);\n            this.Controls.Add(this.panel2);\n            this.MaximizeBox = false;\n            this.MaximumSize = this.Size;\n            this.MinimumSize = this.Size;\n            this.Name = \"Form1\";\n            this.MaximizeBox = false;\n            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\n            this.Text = \"Disabled Dates\";\n            this.Load += new System.EventHandler(this.Form1_Load);\n            this.borderPanel1.ResumeLayout(false);\n            this.borderPanel1.PerformLayout();\n            this.ResumeLayout(false);\n\n        }\n\n      \n        #endregion\n\n        private System.Windows.Forms.Panel panel2;\n        private System.Windows.Forms.Panel panel6;\n        private System.Windows.Forms.Panel borderPanel1;\n        private Syncfusion.WinForms.Input.SfCalendar sfCalendar;\n        private System.Windows.Forms.Label captionLbl;\n        private System.Windows.Forms.Label label2;\n        private Syncfusion.WinForms.Input.SfDateTimeEdit maxDateTimeEdit;\n        private System.Windows.Forms.Label label3;\n        private Syncfusion.WinForms.Input.SfDateTimeEdit minDateTimeEdit;\n        private System.Windows.Forms.Label minDate_lbl;\n    }\n}\n\n"
    },
    {
      "target": "src/components/scheduler-disabled-dates/scheduler.cs",
      "content": "using Syncfusion.WinForms.Controls;\nusing Syncfusion.WinForms.Input;\nusing System;\nusing System.Collections.Generic;\nusing System.Drawing;\nusing System.Windows.Forms;\n\nnamespace DisabledDates\n{\n    /// <summary>\n    /// Demonstrates the SfCalendar blackout dates: the weekends inside the\n    /// selected date range are disabled and the range can be changed at runtime.\n    /// </summary>\n    public partial class Form1 : SfForm\n    {\n        /// <summary>\n        /// Initializes a new instance of the <see cref=\"Form1\"/> class.\n        /// </summary>\n        public Form1()\n        {\n            InitializeComponent();\n        }\n\n        #region Functions\n\n        /// <summary>\n        /// Configures the default selectable date range of the calendar.\n        /// </summary>\n        public void ConfigureDateRange()\n        {\n            this.minDateTimeEdit.ValueChanged += MinDateTimeEdit_ValueChanged;\n            this.maxDateTimeEdit.ValueChanged += MaxDateTimeEdit_ValueChanged;\n\n            minDateTimeEdit.Value = DisabledDatesDataSource.GetDefaultMinDate();\n            maxDateTimeEdit.Value = DisabledDatesDataSource.GetDefaultMaxDate();\n\n            GetWeekends();\n\n            this.sfCalendar.MinDate = minDateTimeEdit.Value.Value;\n            this.sfCalendar.MaxDate = maxDateTimeEdit.Value.Value;\n            this.minDateTimeEdit.MonthCalendar.ShowFooter = false;\n            this.maxDateTimeEdit.MonthCalendar.ShowFooter = false;\n            this.label2.Text = this.sfCalendar.SelectedDate.Value.ToLongDateString();\n        }\n\n        /// <summary>\n        /// Centers the calendar panel inside the form.\n        /// </summary>\n        public void MakePanelCenter()\n        {\n            this.borderPanel1.Location = new Point(\n                this.ClientSize.Width / 2 - borderPanel1.Size.Width / 2,\n                this.ClientSize.Height / 2 - borderPanel1.Size.Height / 2);\n        }\n\n        /// <summary>\n        /// Marks every weekend inside the selected range as a blackout date.\n        /// </summary>\n        public void GetWeekends()\n        {\n            List<DateTime> weekends = DisabledDatesDataSource.GetWeekends(\n                minDateTimeEdit.Value.Value,\n                maxDateTimeEdit.Value.Value);\n\n            this.sfCalendar.BlackoutDates = weekends;\n        }\n\n        #endregion\n\n        #region Events\n\n        /// <summary>\n        /// Applies the new maximum date to the calendar and refreshes the blackout dates.\n        /// </summary>\n        private void MaxDateTimeEdit_ValueChanged(object sender, Syncfusion.WinForms.Input.Events.DateTimeValueChangedEventArgs e)\n        {\n            this.sfCalendar.MaxDate = (sender as SfDateTimeEdit).Value.Value;\n            this.minDateTimeEdit.MaxDateTime = (sender as SfDateTimeEdit).Value.Value;\n            GetWeekends();\n        }\n\n        /// <summary>\n        /// Applies the new minimum date to the calendar and refreshes the blackout dates.\n        /// </summary>\n        private void MinDateTimeEdit_ValueChanged(object sender, Syncfusion.WinForms.Input.Events.DateTimeValueChangedEventArgs e)\n        {\n            this.sfCalendar.MinDate = (sender as SfDateTimeEdit).Value.Value;\n            this.maxDateTimeEdit.MinDateTime = (sender as SfDateTimeEdit).Value.Value;\n            GetWeekends();\n        }\n\n        /// <summary>\n        /// Prepares the form when it is loaded.\n        /// </summary>\n        private void Form1_Load(object sender, EventArgs e)\n        {\n            MakePanelCenter();\n            ConfigureDateRange();\n            UpdateVisualStyle();\n        }\n\n        /// <summary>\n        /// Applies the visual style used by the sample.\n        /// </summary>\n        private void UpdateVisualStyle()\n        {\n            this.label2.ForeColor = ColorTranslator.FromHtml(\"#444444\");\n            this.label3.ForeColor = ColorTranslator.FromHtml(\"#444444\");\n            this.captionLbl.ForeColor = ColorTranslator.FromHtml(\"#444444\");\n            this.BackColor = ColorTranslator.FromHtml(\"#f3f3f3\");\n            SfSkinManager.SetVisualStyle(this, \"Office2019Colorful\");\n        }\n\n        /// <summary>\n        /// Keeps the calendar panel centered while the form is resized.\n        /// </summary>\n        protected override void OnSizeChanged(EventArgs e)\n        {\n            MakePanelCenter();\n            base.OnSizeChanged(e);\n        }\n\n        /// <summary>\n        /// Shows the date that is currently selected.\n        /// </summary>\n        private void sfCalendar_SelectionChanged(object sender, Syncfusion.WinForms.Input.Events.SelectionChangedEventArgs e)\n        {\n            if (this.sfCalendar.SelectedDate == null)\n            {\n                this.label2.Text = \"None\";\n            }\n            else\n            {\n                this.label2.Text = this.sfCalendar.SelectedDate.Value.ToLongDateString();\n            }\n        }\n\n        #endregion\n    }\n}\n"
    }
  ]
}