You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, We would like to congratulate you on the development, because you have created a very useful tool.
In our projects, we plan to replace the current date picker with this component.
We had some further development needs that we prepared and would like to share them with you.
We hope that these changes can become part of the components further releases.
The improvements we carried out:
adding a "seconds" field to the time format
triggering the "onchange" event of the input field in the event of a date change
correction of decision to switch dates if enddatetime is before startdatetime
new isSameDateTime function to handle same date but different time situations
Quickselect "plugin", to add option to select frequently used datetimes
Quickselect works only if range is true and quickselect array is not empty. To use it, you have to add options to quickselect array elemements as in the example below.
Datetime definitions:
- relative time: value (decimal) and unit string, where unit is one of these options:
second: "s",
minute: "m",
hour: "h",
day: "d",
week: "w",
month: "M",
year: "Y"
- constants:
"now"
"today" - current day 00:00:00
"lastdaystart" - previous day 00:00:00
"lastdayend" - previous day 23:59:59
"weekstart" - current week first day 00:00:00
"lastweekstart" - previous week first day 00:00:00
"lastweekend" - previous week last day 23:59:59
"monthstart" - current month first day 00:00:00
"monthend" - current month last day 23:59:59
"lastmonthstart" - previous month first day 00:00:00
"lastmonthend" - previous month last day 23:59:59
Example:
quickselect: [
{
content: 'Today',
startdate: 'today',
enddate: 'now'
},
{
content: 'Yesterday',
startdate: 'lastdaystart',
enddate: 'lastdayend'
},
{
content: 'Current week',
startdate: 'weekstart',
enddate: 'now'
},
{
content: 'Previous week',
startdate: 'lastweekstart',
enddate: 'lastweekend'
},
{
content: 'Current month',
startdate: 'monthstart',
enddate: 'now'
},
{
content: 'Previous month',
startdate: 'lastmonthstart',
enddate: 'lastmonthend'
},
{
content: '1 hour',
startdate: '-1h',
enddate: 'now'
},
{
content: '4 hour',
startdate: '-4h',
enddate: 'now'
},
{
content: '8 hour',
startdate: '-8h',
enddate: 'now'
},
{
content: '1 day',
startdate: '-1d',
enddate: 'now'
},
{
content: '3 days',
startdate: '-3d',
enddate: 'now'
},
{
content: '7 days',
startdate: '-7d',
enddate: 'now'
},
{
content: '14 days',
startdate: '-14d',
enddate: 'now'
},
{
content: '30 days',
startdate: '-30d',
enddate: 'now'
},
]
Best regards,
Gabor Balazs
head of Selected Solution Management Ltd. development src.zip
The text was updated successfully, but these errors were encountered:
Dear Air-datepicker developers,
First of all, We would like to congratulate you on the development, because you have created a very useful tool.
In our projects, we plan to replace the current date picker with this component.
We had some further development needs that we prepared and would like to share them with you.
We hope that these changes can become part of the components further releases.
The improvements we carried out:
Quickselect works only if range is true and quickselect array is not empty. To use it, you have to add options to quickselect array elemements as in the example below.
Datetime definitions:
- relative time: value (decimal) and unit string, where unit is one of these options:
second: "s",
minute: "m",
hour: "h",
day: "d",
week: "w",
month: "M",
year: "Y"
- constants:
"now"
"today" - current day 00:00:00
"lastdaystart" - previous day 00:00:00
"lastdayend" - previous day 23:59:59
"weekstart" - current week first day 00:00:00
"lastweekstart" - previous week first day 00:00:00
"lastweekend" - previous week last day 23:59:59
"monthstart" - current month first day 00:00:00
"monthend" - current month last day 23:59:59
"lastmonthstart" - previous month first day 00:00:00
"lastmonthend" - previous month last day 23:59:59
Example:
quickselect: [
{
content: 'Today',
startdate: 'today',
enddate: 'now'
},
{
content: 'Yesterday',
startdate: 'lastdaystart',
enddate: 'lastdayend'
},
{
content: 'Current week',
startdate: 'weekstart',
enddate: 'now'
},
{
content: 'Previous week',
startdate: 'lastweekstart',
enddate: 'lastweekend'
},
{
content: 'Current month',
startdate: 'monthstart',
enddate: 'now'
},
{
content: 'Previous month',
startdate: 'lastmonthstart',
enddate: 'lastmonthend'
},
{
content: '1 hour',
startdate: '-1h',
enddate: 'now'
},
{
content: '4 hour',
startdate: '-4h',
enddate: 'now'
},
{
content: '8 hour',
startdate: '-8h',
enddate: 'now'
},
{
content: '1 day',
startdate: '-1d',
enddate: 'now'
},
{
content: '3 days',
startdate: '-3d',
enddate: 'now'
},
{
content: '7 days',
startdate: '-7d',
enddate: 'now'
},
{
content: '14 days',
startdate: '-14d',
enddate: 'now'
},
{
content: '30 days',
startdate: '-30d',
enddate: 'now'
},
]
Best regards,
Gabor Balazs
head of Selected Solution Management Ltd. development
src.zip
The text was updated successfully, but these errors were encountered: