<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="C1Calendar_Sample._Default" %>

<%@ Register Assembly="C1.Web.Wijmo.Controls.48" Namespace="C1.Web.Wijmo.Controls.C1Calendar" TagPrefix="wijmo" %>

<%@ Register Assembly="C1.Web.Wijmo.Controls.48" Namespace="C1.Web.Wijmo.Controls.C1Input" TagPrefix="wijmo" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

    <script>
        function SelectDateDesde() {
            var date = $('#<%= C1InputDate1.ClientID %>').c1inputdate('option', 'date');
            var calendar = $('#<%= C1Calendar1.ClientID %>');

            calendar.c1calendar("popup", {
                of: $('#calendar-popup'),   // anchor element
                my: 'right top',               // which corner of the calendar to anchor
                at: 'right bottom'             // which corner of the anchor element to align to
            });

            calendar.c1calendar("selectDate", date);
        }
    </script>

    <wijmo:C1InputDate ID="C1InputDate1" runat="server" Date="05/12/2026"></wijmo:C1InputDate>

    <button type="button" id="calendar-popup" onclick="SelectDateDesde()" class="btn btn-primary">SelectDateDesde</button>

    <wijmo:C1Calendar ID="C1Calendar1" PopupMode="true" runat="server"></wijmo:C1Calendar>
</asp:Content>
