Skip to content

Commit

Permalink
DRB Demo: add disableOutOfRangeSelection property demonstration (#2964)
Browse files Browse the repository at this point in the history
* add disableOutOfRangeSelection property demonstration

* update baselines

* PR requested changes

* baseline updated

* change reactJs  demo
  • Loading branch information
AlexanderMoiseev authored Nov 6, 2023
1 parent db2e191 commit c7691f7
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Single-calendar View</div>
<div class="dx-field-label">Single-calendar view</div>
<div class="dx-field-value">
<dx-date-range-box [multiView]="false"></dx-date-range-box>
</div>
Expand All @@ -46,6 +46,13 @@
<dx-date-range-box [min]="min" [max]="max"></dx-date-range-box>
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Disable out of range selection</div>
<div class="dx-field-value">
<dx-date-range-box [disableOutOfRangeSelection]="true">
</dx-date-range-box>
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Clear button</div>
<div class="dx-field-value">
Expand Down
8 changes: 7 additions & 1 deletion JSDemos/Demos/DateRangeBox/Overview/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function App() {
</div>
</div>
<div className="dx-field">
<div className="dx-field-label">Single-calendar View</div>
<div className="dx-field-label">Single-calendar view</div>
<div className="dx-field-value">
<DateRangeBox multiView={false} />
</div>
Expand All @@ -86,6 +86,12 @@ export default function App() {
/>
</div>
</div>
<div className="dx-field">
<div className="dx-field-label">Disable out of range selection</div>
<div className="dx-field-value">
<DateRangeBox disableOutOfRangeSelection={true} />
</div>
</div>
<div className="dx-field">
<div className="dx-field-label">Clear button</div>
<div className="dx-field-value">
Expand Down
8 changes: 7 additions & 1 deletion JSDemos/Demos/DateRangeBox/Overview/ReactJs/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function App() {
</div>
</div>
<div className="dx-field">
<div className="dx-field-label">Single-calendar View</div>
<div className="dx-field-label">Single-calendar view</div>
<div className="dx-field-value">
<DateRangeBox multiView={false} />
</div>
Expand All @@ -76,6 +76,12 @@ export default function App() {
/>
</div>
</div>
<div className="dx-field">
<div className="dx-field-label">Disable out of range selection</div>
<div className="dx-field-value">
<DateRangeBox disableOutOfRangeSelection={true} />
</div>
</div>
<div className="dx-field">
<div className="dx-field-label">Clear button</div>
<div className="dx-field-value">
Expand Down
10 changes: 9 additions & 1 deletion JSDemos/Demos/DateRangeBox/Overview/Vue/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Single-calendar View</div>
<div class="dx-field-label">Single-calendar view</div>
<div class="dx-field-value">
<DxDateRangeBox
:multi-view="false"
Expand All @@ -57,6 +57,14 @@
/>
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Disable out of range selection</div>
<div class="dx-field-value">
<DxDateRangeBox
:disable-out-of-range-selection="true"
/>
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Clear button</div>
<div class="dx-field-value">
Expand Down
8 changes: 7 additions & 1 deletion JSDemos/Demos/DateRangeBox/Overview/jQuery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Single-calendar View</div>
<div class="dx-field-label">Single-calendar view</div>
<div class="dx-field-value">
<div id="single-view"></div>
</div>
Expand All @@ -57,6 +57,12 @@
<div id="current-month-only"></div>
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Disable out of range selection</div>
<div class="dx-field-value">
<div id="disable-out-of-range-selection"></div>
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Clear button</div>
<div class="dx-field-value">
Expand Down
4 changes: 4 additions & 0 deletions JSDemos/Demos/DateRangeBox/Overview/jQuery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ $(() => {
value: initialValue,
});

$('#disable-out-of-range-selection').dxDateRangeBox({
disableOutOfRangeSelection: true,
});

function getCurrentMonthRange() {
const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0).getDate();

Expand Down
10 changes: 9 additions & 1 deletion MVCDemos/Views/DateRangeBox/Overview.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Single-calendar View</div>
<div class="dx-field-label">Single-calendar view</div>
<div class="dx-field-value">
@(Html.DevExtreme().DateRangeBox()
.MultiView(false)
Expand All @@ -56,6 +56,14 @@
)
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Disable out of range selection</div>
<div class="dx-field-value">
@(Html.DevExtreme().DateRangeBox()
.DisableOutOfRangeSelection(true)
)
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Clear button</div>
<div class="dx-field-value">
Expand Down
10 changes: 9 additions & 1 deletion NetCoreDemos/Views/DateRangeBox/Overview.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Single-calendar View</div>
<div class="dx-field-label">Single-calendar view</div>
<div class="dx-field-value">
@(Html.DevExtreme().DateRangeBox()
.MultiView(false)
Expand All @@ -56,6 +56,14 @@
)
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Disable out of range selection</div>
<div class="dx-field-value">
@(Html.DevExtreme().DateRangeBox()
.DisableOutOfRangeSelection(true)
)
</div>
</div>
<div class="dx-field">
<div class="dx-field-label">Clear button</div>
<div class="dx-field-value">
Expand Down
Binary file modified testing/etalons/DateRangeBox-Overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c7691f7

Please sign in to comment.