// <#-- Calendar Window -->
Ext.define("App.view.CalendarWindow", {
    extend: "Ext.window.Window",
    xtype: "calendarWindow",
    alias: "widget.calendarWindow",

    scrollable: true,
    constrainHeader: true,
    title: "",
    layout: "fit",
    modal: true,
    width: 707,
    closable: true,

    initComponent: function() {
        var me = this;

        Ext.apply(me, {
            items:[
                {
                    xtype:'calendar-form-add',
                    
                }
            ],

            listeners: {
                show: function(window, opts) {
                    if (me.params) {
                        var d = new Date(me.params.selectedDate);
                        selectedDate = Ext.util.Format.date(d);
                        me.setTitle(selectedDate + " Detail");
                    }
                    console.log(d);
                    console.log(selectedDate);
                }
            }
        });

        me.callParent(arguments);
    }
});
