Search code examples
c#visual-studioext.netnext.js

Disable all mondays from date picker .ext


I´m trying to disable of mondays from a date picker in ext.js, but no sure how to make it without implement an array. cuz an array limite the range & days, & i want to disable for ever.

aspx:

    <ext:DatePicker ID="DPdate" runat="server" Format="d/m/y">
                                    <DirectEvents>
                                        <Select OnEvent="LoadTableByDate">
                                            <EventMask Msg="Cargando 

Disponiblidad de salas" ShowMask="true" />
                                            <ExtraParams>
                                                <ext:Parameter Value="Ext.Date.format(App.DPdate.getValue(), 'd/m/Y')" Mode="Raw" Name="DPpicker" />
                                            </ExtraParams>
                                       </Select>
                                </DirectEvents>
                     </ext:DatePicker>

Solution

  • You can use the DisabledDays setting to disable given week days:

    <ext:DatePicker ID="DPdate" runat="server" Format="d/m/y" DisabledDays="1" />
    

    Source: Ext.NET 4.2.1 API docs on the DatePicker component