UNPKG

react-multi-date-picker

Version:

A simple React datepicker component for working with gregorian, persian, arabic and indian calendars with the ability to select the date by single, multiple, range and multiple range pickers.

2 lines (1 loc) 1.42 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Button=t(e.React)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=["value","stringDate","stringDates","placeholder","handleValueChange","separator","openCalendar","className","type","children"];return function(e){var t=e.value;e.stringDate,e.stringDates;var l=e.placeholder;e.handleValueChange,e.separator;var i=e.openCalendar,u=e.className,c=void 0===u?"rmdp-button":u,s=e.type,f=void 0===s?"button":s,p=e.children,d=a(e,o);return n.default.createElement("button",r({onClick:i,className:c,type:f},d),p||t||l||"Click to select")}}));