{"id":13765950,"url":"https://github.com/wencywww/Ext.ux.button.DateRangePicker","last_synced_at":"2025-05-10T21:32:29.063Z","repository":{"id":71956558,"uuid":"45988841","full_name":"wencywww/Ext.ux.button.DateRangePicker","owner":"wencywww","description":"Date Range Picker Button for ExtJS 4/5/6/7","archived":false,"fork":false,"pushed_at":"2019-10-10T07:24:34.000Z","size":38,"stargazers_count":17,"open_issues_count":0,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-03T16:08:59.734Z","etag":null,"topics":["datepickers","daterangepicker-component","extjs","picker","sencha","sencha-extjs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wencywww.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-11-11T15:08:20.000Z","updated_at":"2024-04-30T17:59:23.000Z","dependencies_parsed_at":"2023-03-11T11:39:24.975Z","dependency_job_id":null,"html_url":"https://github.com/wencywww/Ext.ux.button.DateRangePicker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wencywww%2FExt.ux.button.DateRangePicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wencywww%2FExt.ux.button.DateRangePicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wencywww%2FExt.ux.button.DateRangePicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wencywww%2FExt.ux.button.DateRangePicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wencywww","download_url":"https://codeload.github.com/wencywww/Ext.ux.button.DateRangePicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224989921,"owners_count":17403409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datepickers","daterangepicker-component","extjs","picker","sencha","sencha-extjs"],"created_at":"2024-08-03T16:00:49.535Z","updated_at":"2024-11-17T01:31:45.448Z","avatar_url":"https://github.com/wencywww.png","language":"JavaScript","funding_links":[],"categories":["Extensions, components"],"sub_categories":["Components, ux"],"readme":"\nDate Range Picker Component for ExtJS\n-------------------------------------\n\n\n\n![preview](resources/pickerPreview.png)\n\n**Source at GitHub**\n\n[https://github.com/wencywww/Ext.ux.button.DateRangePicker](https://github.com/wencywww/Ext.ux.button.DateRangePicker)\n\n\n\n**Demos**\n\n[Sencha's Fiddle: https://fiddle.sencha.com/#fiddle/10t2](https://fiddle.sencha.com/#fiddle/10t2)\n\n[JSFiddle: http://jsfiddle.net/mx_starter/xLvg5yj6/](http://jsfiddle.net/mx_starter/xLvg5yj6/)\n\n\n\n\n\n**Features:**\n\n  * Easily choose period between two dates via a single button\n  * Can be used everywhere within the app, just as a normal button\t  \n  * Optionally, include start/end times in the dates\n  * Optionally, two datefield components could be bound and automatically updated by the pickers\n  * 5 preset periods available for quick set - this week, last week, this month, last month, this year\n  * Custom formats accepted for dates and times\n  * Customizable captions, icons  \n  * Customizable via a simple config object\n  * Returns an object containg the period details via the getPickerValue() method\n  * Returned object also containg PRECISED period details, eg. 13 months are shown as 1 year and 1 month and so on\n  * Tested with ExtJS version 4.2.1.883 and up to 7.0.0.151  \n\n\n**Component layout:**\n\n  * It is a ExtJS button with a menu\n  * The menu includes a single item, panel\n  * The panel has separate containers for start/end datepickers and timefields\n  * The panel includes 2 buttons for choosing the preset periods / confirming the choice\n\n    \n**Config object**\n\n  * The config object is optional, if some of the configs are not provided, or there is no config object at all, defaults are applied\n  * Config object name is **drpDefaults** and accepts the following keys\n  * **selectedStart**, string in the format 'Y-m-d', sets the first datepicker value, defaults to the first day of the curren month\n  * **selectedEnd**, string in the format 'Y-m-d', sets the second datepicker value, defaults to today\n  * **dateFormat**, string in the Ext.Date.parse() recognisable format, determines how the dates are shown by the component, defaults to 'Y-m-d'\n  * **showButtonTip**, boolean value, if true, applies a tooltip to the main button with a current selection, defaults to true\n  * **showTimePickers**, boolean value, if true, two timefields are added below the datepickers to be able to choose start/end times\n  * **timeFormat**, formatting string for the timefields, must be recognisable by Ext.Date.parse()\n  * **timePickerFromValue**, string with a value of the first timefield, must be recognisable by Ext.Date.parse() and MUST MATCH the timeFormat config, defaults to 'H:i:s'\n  * **timePickerToValue**, string with a value of the second timefield, must be recognisable by Ext.Date.parse() and MUST MATCH the timeFormat config, defaults to 'H:i:s'\n  * **timePickersEditable**, boolean value, if true, the timefields combos will be editable, defaults to false\n  * **timeIncrement**, number, indicating the step (in minutes) the timefield's combo records are generated, defaults to 5\n  * **timePickersQueryDelay**, number, the timefield's combos query delay, defaults to 500\n  * **timePickersWidth**, number, the timefield's width, defaults to 100\n  * **mainBtnTextPrefix**, string, the prefix of the main button, defaults to 'Period: '\n  * **mainBtnIconCls**, string, for setting an icon of the main button, use null if icon is not needed, defaults to 'drp-icon-calendar' \n  * **mainBtnTextColor**, string, for setting the main button text color (excludng the prefix), defaults to '#000000'\n  * **confirmBtnText**, string, the text of the bottom-right confirm button, defaults to 'Set Range'\n  * **confirmBtnIconCls**, string, for setting an icon of the confirm button, use null if icon is not needed, defaults to 'drp-icon-yes' \n  * **presetPeriodsBtnText**, string, the text of the bottom-left preset period button, defaults to 'Preset Periods'\n  * **presetPeriodsBtnIconCls**, string, for setting an icon of the preset period button, use null if icon is not needed, defaults to 'drp-icon-calendar' \n  * **presetPeriodsThisWeekText**, string, menu option text for choosing this week, defaults to 'This Week'\n  * **presetPeriodsLastWeekText**, string, menu option text for choosing last week, defaults to 'Last Week'\n  * **presetPeriodsThisMonthText**, string, menu option text for choosing this month, defaults to 'This Month'\n  * **presetPeriodsLastMonthText**, string, menu option text for choosing the last month, defaults to 'Last Month'\n  * **presetPeriodsThisYearText**, string, menu option text for choosing the last week, defaults to 'This Year',\n  * **bindDateFields**, boolean, if true, allows two date fields to be bound to the picker and automatically updated, defaults to false\n  * **boundStartField**, Ext.form.field.Date instance, to be bound to the first datepicker, defaults to null\n  * **boundEndField**, Ext.form.field.Date instance, to be bound to the second datepicker, defaults to null\n  * **diffPreciseUnits**, object, customizes precised period details captions for year/years, month/months, day/days and so on, used to build the diffAsText property of the periodDetailsPrecise object part of the responce, defaults to \n  \n  \n  `{\n        year: 'year',\n        years: 'years',\n        month: 'month',\n        months: 'months',\n        day: 'day',\n        days: 'days',\n        hour: 'hour',\n        hours: 'hours',\n        minute: 'minute',\n        minutes: 'minutes',\n        second: 'second',\n        seconds: 'seconds',\n        delimiter: ' '\n    }`\n\n  \n**Usage**\n\n  * Include the `css/DateRangePicker.css` file (can be ommited if not using icons, or you want to use own icons)\n  * Include the `src/dateRangePicker.js` file (Ext must be included prior to this)\n  * Instantiate the class, for example `var myRangePicker = Ext.create('Ext.ux.button.DateRangePicker', drpDefaults: {} )`, or using the 'daterangepicker' xtype\n  * To get the value of the instance, use `var myPickerValue = myRangePicker.getPickerValue()` and inspect the myPickerValue object\n  \n\n**List of Changes**\n\n  * **2019-10-10**, added e preview picture to the repository, changed Sencha Fiddle's ExtJS version to be 7.0.0.151 by default\n  * **2017-05-18**, renamed picker's getValue() to getPickerValue() to work with 6.2/6.5\n  * **2015-11-12**, added 'requires' config for including Ext.picker.Date \u0026 Ext.form.field.Time if needed\n  * **2015-11-12**, added support for binding two datefield components to the picker and automatically set their values upon picker change\n  * **2015-11-12**, added diffPreciseUnits config option for customizing captions used to build the diffAsText property of the periodDetailsPrecise object part of the responce\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwencywww%2FExt.ux.button.DateRangePicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwencywww%2FExt.ux.button.DateRangePicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwencywww%2FExt.ux.button.DateRangePicker/lists"}