{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "scheduler-external-drag-and-drop",
  "framework": "aspnet-core",
  "type": "registry:component",
  "component": "Scheduler",
  "variant": "external-drag-and-drop",
  "dependencies": [
    "Syncfusion.AspNetCore.Schedule"
  ],
  "description": "Scheduler with a waiting list that supports dragging external items into resource timelines.",
  "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/aspnet-core/llms.txt",
    "skillPack": "syncfusion/aspnetcore-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/aspnet-core/scheduler-external-drag-and-drop.md"
  },
  "files": [
    {
      "target": "src/components/scheduler-external-drag-and-drop/scheduler.cshtml",
      "content": "@page\n@namespace aspnet_core.Scheduler.ExternalDragAndDrop\n@model EJ2CoreSampleBrowser.Scheduler.ExternalDragAndDrop.ExternalDragAndDropModel\n@using Syncfusion.EJ2\n\n    <div class=\"control-section\">\n        <div class=\"content-wrapper\" style=\"display: flex; gap: 12px;\">\n            <div style=\"width: 220px;\">\n                <div class=\"schedule-header\" style=\"font-weight: 600; padding: 6px 0;\">Waiting List</div>\n                <div id=\"waiting-list\">\n                    @foreach (var item in Model.WaitingItems)\n                    {\n                        <div class=\"waiting-item\" draggable=\"true\" data-id=\"@item.Id\" style=\"border: 1px solid #ccc; padding: 6px; margin-bottom: 6px; cursor: grab;\">\n                            <div>@item.Name</div>\n                            <div style=\"font-size: 11px; color: #666;\">@item.Role</div>\n                        </div>\n                    }\n                </div>\n            </div>\n            <div style=\"flex: 1;\">\n                <ejs-schedule id=\"schedule\" height=\"650px\" selectedDate=\"@Model.SelectedDate\">\n                    <e-schedule-eventsettings dataSource=\"@Model.Appointments\"></e-schedule-eventsettings>\n                    <e-schedule-views>\n                        <e-schedule-view option=\"Day\"></e-schedule-view>\n                        <e-schedule-view option=\"Week\"></e-schedule-view>\n                        <e-schedule-view option=\"WorkWeek\"></e-schedule-view>\n                        <e-schedule-view option=\"Month\"></e-schedule-view>\n                    </e-schedule-views>\n                </ejs-schedule>\n            </div>\n        </div>\n    </div>\n\n    <script>\n        // Allow dragging items from the waiting list into the schedule.\n        document.addEventListener('DOMContentLoaded', function () {\n            document.querySelectorAll('.waiting-item').forEach(function (el) {\n                el.addEventListener('dragstart', function (e) {\n                    e.dataTransfer.setData('text/plain', e.target.dataset.id);\n                });\n            });\n            var scheduler = document.getElementById('schedule');\n            if (scheduler) {\n                scheduler.addEventListener('dragover', function (e) { e.preventDefault(); });\n                scheduler.addEventListener('drop', function (e) {\n                    e.preventDefault();\n                    var id = e.dataTransfer.getData('text/plain');\n                    var item = document.querySelector('[data-id=\"' + id + '\"]');\n                    if (item && scheduler.ej2_instances && scheduler.ej2_instances[0]) {\n                        // For brevity, just remove the dragged item from the\n                        // waiting list. A full implementation would call\n                        // scheduler.openAddDialog or add an appointment here.\n                        item.remove();\n                    }\n                });\n            }\n        });\n    </script>\n"
    },
    {
      "target": "src/components/scheduler-external-drag-and-drop/scheduler.cshtml.cs",
      "content": "using System;\nusing System.Collections.Generic;\nusing Microsoft.AspNetCore.Mvc.RazorPages;\n\nnamespace EJ2CoreSampleBrowser.Scheduler.ExternalDragAndDrop\n{\n    public class ExternalDragAndDropModel : PageModel\n    {\n        public DateTime SelectedDate { get; set; } = DateTime.Today;\n        public List<WaitingItem> WaitingItems { get; set; }\n        public List<SchedulerAppointment> Appointments { get; set; }\n\n        public void OnGet()\n        {\n            WaitingItems = new List<WaitingItem>\n            {\n                new WaitingItem { Id = 1, Name = \"Person One\",   Role = \"Reviewer\" },\n                new WaitingItem { Id = 2, Name = \"Person Two\",   Role = \"Presenter\" },\n                new WaitingItem { Id = 3, Name = \"Person Three\", Role = \"Note taker\" },\n            };\n            Appointments = new List<SchedulerAppointment>\n            {\n                new SchedulerAppointment\n                {\n                    Id = 1, Subject = \"Kickoff meeting\",\n                    StartTime = SelectedDate.AddHours(9),\n                    EndTime = SelectedDate.AddHours(10),\n                },\n                new SchedulerAppointment\n                {\n                    Id = 2, Subject = \"Daily standup\",\n                    StartTime = SelectedDate.AddDays(1).AddHours(9),\n                    EndTime = SelectedDate.AddDays(1).AddHours(9.5),\n                    RecurrenceRule = \"FREQ=DAILY;INTERVAL=1\",\n                },\n            };\n        }\n    }\n\n    public class WaitingItem\n    {\n        public int Id { get; set; }\n        public string Name { get; set; }\n        public string Role { get; set; }\n    }\n\n    public class SchedulerAppointment\n    {\n        public int Id { get; set; }\n        public string Subject { get; set; }\n        public DateTime StartTime { get; set; }\n        public DateTime EndTime { get; set; }\n        public string RecurrenceRule { get; set; }\n    }\n}\n"
    }
  ]
}