{"_id":"@codemaxz/react-native-calendars-th","_rev":"3-6c798a6f2a0a6fbc62b0f30310c90a2a","name":"@codemaxz/react-native-calendars-th","description":"React Native Calendar Components","dist-tags":{"latest":"1.9.0-1"},"versions":{"1.9.0":{"name":"@codemaxz/react-native-calendars-th","version":"1.9.0","main":"src/index.js","description":"React Native Calendar Components","scripts":{"test":"jasmine src/*.spec.js && npm run lint","lint":"eslint src/ example/src"},"repository":{"type":"git","url":"git+https://github.com/codemaxz/react-native-calendars-th.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"author":{"name":"Wix.com | Modify by Eakkabin Jaikeawma"},"license":"MIT","dependencies":{"prop-types":"^15.5.10","xdate":"^0.8.0"},"devDependencies":{"eslint":"^3.19.0","babel-eslint":"^7.2.3","eslint-plugin-react":"^7.0.0","jasmine":"^2.5.2","react":"16.0.0-alpha.12","react-native":"0.47.2"},"gitHead":"dbc482eba86c9e8aab067af6813be422737bdd4a","bugs":{"url":"https://github.com/codemaxz/react-native-calendars-th/issues"},"homepage":"https://github.com/codemaxz/react-native-calendars-th#readme","_id":"@codemaxz/react-native-calendars-th@1.9.0","_shasum":"0a4096337fc87f6105d553bb61daa7e0301bf3cf","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.3","_npmUser":{"name":"coachmaxz","email":"eakkabin_it@hotmail.com"},"dist":{"shasum":"0a4096337fc87f6105d553bb61daa7e0301bf3cf","tarball":"https://registry.npmjs.org/@codemaxz/react-native-calendars-th/-/react-native-calendars-th-1.9.0.tgz","integrity":"sha512-oL/wRRk4ICeyKiMB5FiMRFSb72exD5GPEVUJPBg+J4Fj77jp98KtFfvgK4wEWGBs9Rxk//6X+U0Dl/IcoMpAhw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCr9sC6R0sSOBqtzckCLBrWTQNuCrfUSVn1/7+KWRdyIQIhAIsh4+Vfw8MWH1y8sSBrOKZIZGi/DQ7gd5lu3fmmX7LM"}]},"maintainers":[{"name":"coachmaxz","email":"eakkabin_it@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-calendars-th-1.9.0.tgz_1509557225043_0.7908066993113607"}},"1.9.0-1":{"name":"@codemaxz/react-native-calendars-th","version":"1.9.0-1","main":"src/index.js","description":"React Native Calendar Components","scripts":{"test":"jasmine src/*.spec.js && npm run lint","lint":"eslint src/ example/src"},"repository":{"type":"git","url":"git+https://github.com/codemaxz/react-native-calendars-th.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"author":{"name":"Wix.com | Modify by Eakkabin Jaikeawma"},"license":"MIT","dependencies":{"prop-types":"^15.5.10","xdate":"^0.8.0"},"devDependencies":{"eslint":"^3.19.0","babel-eslint":"^7.2.3","eslint-plugin-react":"^7.0.0","jasmine":"^2.5.2","react":"16.0.0-alpha.12","react-native":"0.47.2"},"gitHead":"1067d0a6b479bc34674def6d22c1bc062a19d912","bugs":{"url":"https://github.com/codemaxz/react-native-calendars-th/issues"},"homepage":"https://github.com/codemaxz/react-native-calendars-th#readme","_id":"@codemaxz/react-native-calendars-th@1.9.0-1","_shasum":"d10c016d5f887c5b15678a264107cdfc60bb2c87","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.3","_npmUser":{"name":"coachmaxz","email":"eakkabin_it@hotmail.com"},"dist":{"shasum":"d10c016d5f887c5b15678a264107cdfc60bb2c87","tarball":"https://registry.npmjs.org/@codemaxz/react-native-calendars-th/-/react-native-calendars-th-1.9.0-1.tgz","integrity":"sha512-IObl2hK4St0FVkJLdOBdfwpW8mNhB28c/EirBRRyrQncnRY86lKtoPMWenGOncdyKRV8YNEK62ru1S/YgOy6rQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3iZTbgfQOJl36chGmGjmmQdBUL8pojdXEZgvYUXZJaAiB/ef69NhL9B7PpRKtksBVjzndK+/7PhcUnZdZ5XsVSow=="}]},"maintainers":[{"name":"coachmaxz","email":"eakkabin_it@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-calendars-th-1.9.0-1.tgz_1509557918438_0.3135837276931852"}}},"readme":"# React Native Calendars Thai ✨ 🗓️ 📆\n[![NPM Version](https://img.shields.io/npm/v/react-native-calendars.svg?style=flat)](https://www.npmjs.com/package/react-native-calendars-th)\n[![Build Status](https://travis-ci.org/wix/react-native-calendars.svg?branch=master)](https://travis-ci.org/wix/react-native-calendars)\n\nThis module includes various customizable react native calendar components.\n\nThe package is both **Android** and **iOS** compatible.\n\n## Try it out\n\nYou can run example module by performing these steps:\n\n```\n$ git clone git@github.com:codemaxz/react-native-calendars-th.git\n$ cd react-native-calendars-th/example\n$ npm install\n$ react-native run-ios\n```\n\nYou can check example screens source code in [example module screens](https://github.com/wix-private/wix-react-native-calendar/tree/master/example/src/screens)\n\nThis project is compatible with Expo/CRNA (without ejecting), and the examples have been [published on Expo](https://expo.io/@community/react-native-calendars-example)\n\n## Installation\n\n```\n$ npm install --save react-native-calendars-th\n```\n\nThe solution is implemented in JavaScript so no native module linking is required.\n\n## Usage\n\n`import {` [Calendar](#calendar), [CalendarList](#calendarlist), [Agenda](#agenda) `} from 'react-native-calendars';`\n\nAll parameters for components are optional. By default the month of current local date will be displayed.\n\nEvent handler callbacks are called with `calendar objects` like this:\n\n```javasctipt\n{\n  day: 1,     // day of month (1-31)\n  month: 1,   // month of year (1-12)\n  year: 2017, // year\n  timestamp,   // UTC timestamp representing 00:00 AM of this date\n  dateString: '2016-05-13' // date formatted as 'YYYY-MM-DD' string\n}\n```\n\nParameters that require date types accept YYYY-MM-DD formated datestrings, JavaScript date objects, `calendar objects` and UTC timestamps.\n\nCalendars can be localized by adding custom locales to `LocaleConfig` object:\n\n```javascript\nimport { LocaleConfig } from 'react-native-calendars-th';\n\nLocaleConfig.locales['th'] = {\n  monthNames: ['มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'],\n  monthNamesShort: ['ม.ค.', 'ก.พ.', 'ม.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย', 'ธ.ค.'],\n  dayNames: ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัสบดี', 'ศุกร์', 'เสาร์'],\n  dayNamesShort: ['อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.']\n};\n\nLocaleConfig.defaultLocale = 'th';\n```\n\n### Calendar\n\n<kbd>\n  <img src=\"https://github.com/wix-private/wix-react-native-calendar/blob/master/demo/calendar.gif?raw=true\">\n</kbd>\n\n#### Basic parameters\n\n```javascript\n<Calendar\n  // Initially visible month. Default = Date()\n  current={'2012-03-01'}\n  // Minimum date that can be selected, dates before minDate will be grayed out. Default = undefined\n  minDate={'2012-05-10'}\n  // Maximum date that can be selected, dates after maxDate will be grayed out. Default = undefined\n  maxDate={'2012-05-30'}\n  // Handler which gets executed on day press. Default = undefined\n  onDayPress={(day) => {console.log('selected day', day)}}\n  // Month format in calendar title. Formatting values: http://arshaw.com/xdate/#Formatting\n  monthFormat={'yyyy MM'}\n  // Handler which gets executed when visible month changes in calendar. Default = undefined\n  onMonthChange={(month) => {console.log('month changed', month)}}\n  // Hide month navigation arrows. Default = false\n  hideArrows={true}\n  // Replace default arrows with custom ones (direction can be 'left' or 'right')\n  renderArrow={(direction) => (<Arrow />)}\n  // Do not show days of other months in month page. Default = false\n  hideExtraDays={true}\n  // If hideArrows=false and hideExtraDays=false do not switch month when tapping on greyed out\n  // day from another month that is visible in calendar page. Default = false\n  disableMonthChange={true}\n  // If firstDay=1 week starts from Monday. Note that dayNames and dayNamesShort should still start from Sunday.\n  firstDay={1}\n  // Hide day names. Default = false\n  hideDayNames={true}\n/>\n```\n\n#### Date marking\n\n**!Disclaimer!** Make sure that `markedDates` param is immutable. If you change `markedDates` object content but the reference to it does not change calendar update will not be triggered.\n\nDot marking\n\n<kbd>\n  <img height=50 src=\"https://github.com/wix-private/wix-react-native-calendar/blob/master/demo/marking1.png?raw=true\">\n</kbd>\n\n```javascript\n<Calendar\n  // Collection of dates that have to be marked. Default = {}\n  markedDates={{\n    '2012-05-16': {selected: true, marked: true},\n    '2012-05-17': {marked: true},\n    '2012-05-18': {disabled: true}\n  }}\n/>\n```\n\nMulti-Dot marking\n\n<kbd>\n <img height=50 src=\"https://github.com/wix-private/wix-react-native-calendar/blob/master/demo/marking4.png?raw=true\">\n</kbd>\n\nUse markingType = 'multi-dot' if you want to display more than one dot. Both the Calendar and CalendarList control support multiple dots by using 'dots' array in markedDates. The properties 'key' and 'color' are mandatory while 'selectedColor' is optional. If selectedColor is omitted then 'color' will be used for selected dates.\n```javascript\nconst vacation = {key:'vacation', color: 'red', selectedColor: 'blue'};\nconst massage = {key:'massage', color: 'blue', selectedColor: 'blue'};\nconst workout = {key:'workout', color: 'green'};\n\n<Calendar\n  markedDates={{\n    '2017-10-25': {dots: [vacation, massage, workout], selected: true},\n    '2017-10-26': {dots: [massage, workout], disabled: true},\n  }},\n  markingType={'multi-dot'}\n/>\n```\n\n\nInterval marking\n\n<kbd>\n  <img height=50 src=\"https://github.com/wix-private/wix-react-native-calendar/blob/master/demo/marking2.png?raw=true\">\n</kbd>\n\n<kbd>\n  <img height=50 src=\"https://github.com/wix-private/wix-react-native-calendar/blob/master/demo/marking3.png?raw=true\">\n</kbd>\n\n```javascript\n<Calendar\n  // Collection of dates that have to be colored in a special way. Default = {}\n   markedDates={\n    {'2012-05-20': [{textColor: 'green'}],\n     '2012-05-22': [{startingDay: true, color: 'green'}],\n     '2012-05-23': [{endingDay: true, color: 'green', textColor: 'gray'}],\n     '2012-05-04': [{startingDay: true, color: 'green'}, {endingDay: true, color: 'green'}]\n    }}\n  // Date marking style [simple/interactive/multi-dot]. Default = 'simple'\n  markingType={'interactive'}\n/>\n```\n\nKeep in mind that different marking types are not compatible. You can use just one marking style for calendar.\n\n#### Displaying data loading indicator\n\n<kbd>\n  <img height=50 src=\"https://github.com/wix-private/wix-react-native-calendar/blob/master/demo/loader.png?raw=true\">\n</kbd>\n\nThe loading indicator next to month name will be displayed if `<Calendar />` has `displayLoadingIndicator` property and `markedDays` collection does not have a value for every day of the month in question. When you load data for days, just set `[]` or special marking value to all days in `markedDates` collection.\n\n#### Customizing look & feel\n\n```javascript\n<Calendar\n  // Specify style for calendar container element. Default = {}\n  style={{\n    borderWidth: 1,\n    borderColor: 'gray',\n    height: 350\n  }}\n  // Specify theme properties to override specific styles for calendar parts. Default = {}\n  theme={{\n    backgroundColor: '#ffffff',\n    calendarBackground: '#ffffff',\n    textSectionTitleColor: '#b6c1cd',\n    selectedDayBackgroundColor: '#00adf5',\n    selectedDayTextColor: '#ffffff',\n    todayTextColor: '#00adf5',\n    dayTextColor: '#2d4150',\n    textDisabledColor: '#d9e1e8',\n    dotColor: '#00adf5',\n    selectedDotColor: '#ffffff',\n    arrowColor: 'orange',\n    monthTextColor: 'blue',\n    textDayFontFamily: 'monospace',\n    textMonthFontFamily: 'monospace',\n    textDayHeaderFontFamily: 'monospace',\n    textDayFontSize: 16,\n    textMonthFontSize: 16,\n    textDayHeaderFontSize: 16\n  }}\n/>\n```\n\n#### Advanced styling\n\nIf you want to have complete control over calendar styles you can do it by overriding default style.js files. For example, if you want to override calendar header style first you have to find stylesheet id for this file:\n\nhttps://github.com/wix/react-native-calendars/blob/master/src/calendar/header/style.js#L4\n\nIn this case it is 'stylesheet.calendar.header'. Next you can add overriding stylesheet to your theme with this id.\n\nhttps://github.com/wix/react-native-calendars/blob/master/example/src/screens/calendars.js#L56\n\n```javascript\ntheme={{\n  arrowColor: 'white',\n  'stylesheet.calendar.header': {\n    week: {\n      marginTop: 5,\n      flexDirection: 'row',\n      justifyContent: 'space-between'\n    }\n  }\n}}\n```\n\n**Disclaimer**: issues that arise because something breaks after using stylesheet override will not be supported. Use this option at your own risk. \n\n### CalendarList\n\n<kbd>\n  <img src=\"https://github.com/wix-private/wix-react-native-calendar/blob/master/demo/calendar-list.gif?raw=true\">\n</kbd>\n\n`<CalendarList />` is scrollable semi-infinite calendar composed of `<Calendar />` components. Currently it is possible to scroll 4 years back and 4 years to the future. All paramters that are available for `<Calendar />` are also available for this component. There are also some additional params that can be used:\n\n```javascript\n<CalendarList\n  // Callback which gets executed when visible months change in scroll view. Default = undefined\n  onVisibleMonthsChange={(months) => {console.log('now these months are visible', months);}}\n  // Max amount of months allowed to scroll to the past. Default = 50\n  pastScrollRange={50}\n  // Max amount of months allowed to scroll to the future. Default = 50\n  futureScrollRange={50}\n  // Enable or disable scrolling of calendar list\n  scrollEnabled={true}\n  ...calendarParams\n/>\n```\n\n### Agenda\n<kbd>\n  <img src=\"https://github.com/wix-private/wix-react-native-calendar/blob/master/demo/agenda.gif?raw=true\">\n</kbd>\n\nAn advanced agenda component that can display interactive listings for calendar day items.\n\n```javascript\n<Agenda\n  // the list of items that have to be displayed in agenda. If you want to render item as empty date\n  // the value of date key kas to be an empty array []. If there exists no value for date key it is\n  // considered that the date in question is not yet loaded\n  items={\n    {'2012-05-22': [{text: 'item 1 - any js object'}],\n     '2012-05-23': [{text: 'item 2 - any js object'}],\n     '2012-05-24': [],\n     '2012-05-25': [{text: 'item 3 - any js object'},{text: 'any js object'}],\n    }}\n  // callback that gets called when items for a certain month should be loaded (month became visible)\n  loadItemsForMonth={(month) => {console.log('trigger items loading')}}\n  // callback that gets called on day press\n  onDayPress={(day)=>{console.log('day pressed')}}\n  // callback that gets called when day changes while scrolling agenda list\n  onDayChange={(day)=>{console.log('day changed')}}\n  // initially selected day\n  selected={'2012-05-16'}\n  // Minimum date that can be selected, dates before minDate will be grayed out. Default = undefined\n  minDate={'2012-05-10'}\n  // Maximum date that can be selected, dates after maxDate will be grayed out. Default = undefined\n  maxDate={'2012-05-30'}\n  // Max amount of months allowed to scroll to the past. Default = 50\n  pastScrollRange={50}\n  // Max amount of months allowed to scroll to the future. Default = 50\n  futureScrollRange={50}\n  // specify how each item should be rendered in agenda\n  renderItem={(item, firstItemInDay) => {return (<View />);}}\n  // specify how each date should be rendered. day can be undefined if the item is not first in that day.\n  renderDay={(day, item) => {return (<View />);}}\n  // specify how empty date content with no items should be rendered\n  renderEmptyDate={() => {return (<View />);}}\n  // specify how agenda knob should look like\n  renderKnob={() => {return (<View />);}}\n  // specify your item comparison function for increased performance\n  rowHasChanged={(r1, r2) => {return r1.text !== r2.text}}\n  // Hide knob button. Default = false\n  hideKnob={true}\n  // By default, agenda dates are marked if they have at least one item, but you can override this if needed\n  markedDates={{\n    '2012-05-16': {selected: true, marked: true},\n    '2012-05-17': {marked: true},\n    '2012-05-18': {disabled: true}\n  }}\n  // agenda theme\n  theme={{\n    ...calendarTheme,\n    agendaDayTextColor: 'yellow',\n    agendaDayNumColor: 'green',\n    agendaTodayColor: 'red',\n    agendaKnobColor: 'blue'\n  }}\n  // agenda container style\n  style={{}}\n/>\n```\n\n## Authors\n\n* [Tautvilas Mecinskas](https://github.com/tautvilas/) - Initial code - [@tautvilas](https://twitter.com/TautviIas)\n* Katrin Zotchev - Initial design - [@katrin_zot](https://twitter.com/katrin_zot)\n\nSee also the list of [contributors](https://github.com/wix/react-native-calendar-components/contributors) who participated in this project.\n\n## Contributing\n\nPull requests are welcome. `npm run test` and `npm run lint` before push.\n","maintainers":[{"name":"coachmaxz","email":"eakkabin_it@hotmail.com"}],"time":{"modified":"2022-06-12T16:20:23.894Z","created":"2017-11-01T17:27:05.111Z","1.9.0":"2017-11-01T17:27:05.111Z","1.9.0-1":"2017-11-01T17:38:38.611Z"},"homepage":"https://github.com/codemaxz/react-native-calendars-th#readme","repository":{"type":"git","url":"git+https://github.com/codemaxz/react-native-calendars-th.git"},"author":{"name":"Wix.com | Modify by Eakkabin Jaikeawma"},"bugs":{"url":"https://github.com/codemaxz/react-native-calendars-th/issues"},"license":"MIT","readmeFilename":"README.md"}