Skip to content

Commit bd6a4ba

Browse files
author
pipeline
committed
bug(EJ2-5291): samples-corrections
1 parent b2457c7 commit bd6a4ba

File tree

6 files changed

+4
-2
lines changed

6 files changed

+4
-2
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.

samples/daterangepicker/presets/app/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { SampleBase } from './sample-base';
77
export class Presets extends SampleBase<{}, {}> {
88
private presets: PresetsArgs[] = [
99
{ label: 'This Week', start: new Date(new Date().setDate(new Date().getDate() - (new Date().getDay() + 7) % 7)),
10-
end: new Date(new Date().setDate(new Date().getDate() - (new Date().getDay() + 7) % 6 + 7)) },
10+
end: new Date(new Date().setDate(new Date(new Date().setDate((new Date().getDate() - (new Date().getDay() + 7) % 7)) + 6).getDate() + 6)) },
1111
{ label: 'This Month', start: new Date(new Date().setDate(1)), end: new Date() },
1212
{ label: 'Last Month', start: new Date(new Date(new Date().setMonth(new Date().getMonth() - 1)).setDate(1)), end: new Date() },
1313
{ label: 'Last Year', start: new Date(new Date().setDate(new Date().getDate() - 365)), end: new Date() }

src/daterangepicker/dayspan.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export class dayspan extends SampleBase<{}, {}> {
2323
<p>
2424
DateRangePicker has <code>minDays</code> and <code>maxDays</code> supports to force the user to select the minimum and maximum number of days in the range. Only the values in this range will be enabled.
2525
</p>
26+
<p>We may have seen in hotel booking website that we can book rooms as packages like 3 or 5 days packages. For this scenario we can use minDays and maxDays.</p>
27+
2628
<p>More information on the DateRangePicker minDays/maxDays support can be found in the
2729
<a href="http://ej2.syncfusion.com/react/documentation/daterangepicker/range-selection.html#range-span"
2830
target="_blank"> documentation section</a>.

src/daterangepicker/presets.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import './daterangepicker-component.css';
77
export class Presets extends SampleBase<{}, {}> {
88
private presets: PresetsArgs[] = [
99
{ label: 'This Week', start: new Date(new Date().setDate(new Date().getDate() - (new Date().getDay() + 7) % 7)),
10-
end: new Date(new Date().setDate(new Date().getDate() - (new Date().getDay() + 7) % 6 + 7)) },
10+
end: new Date(new Date().setDate(new Date(new Date().setDate((new Date().getDate() - (new Date().getDay() + 7) % 7)) + 6).getDate() + 6)) },
1111
{ label: 'This Month', start: new Date(new Date().setDate(1)), end: new Date() },
1212
{ label: 'Last Month', start: new Date(new Date(new Date().setMonth(new Date().getMonth() - 1)).setDate(1)), end: new Date() },
1313
{ label: 'Last Year', start: new Date(new Date().setDate(new Date().getDate() - 365)), end: new Date() }

0 commit comments

Comments
 (0)