{"componentChunkName":"component---src-pages-index-js","path":"/","webpackCompilationHash":"9e30eab50d358a7b5a5f","result":{"data":{"allMarkdownRemark":{"edges":[{"node":{"html":"<h1>TOAST UI Component : Date Picker</h1>\n<blockquote>\n<p>Component that selects specific date.</p>\n</blockquote>\n<p><a href=\"https://github.com/nhn/tui.date-picker/releases/latest\"><img src=\"https://img.shields.io/github/release/nhn/tui.date-picker.svg\" alt=\"GitHub release\"></a>\n<a href=\"https://www.npmjs.com/package/tui-date-picker\"><img src=\"https://img.shields.io/npm/v/tui-date-picker.svg\" alt=\"npm\"></a>\n<a href=\"https://github.com/nhn/tui.date-picker/blob/production/LICENSE\"><img src=\"https://img.shields.io/github/license/nhn/tui.date-picker.svg\" alt=\"GitHub license\"></a>\n<a href=\"https://github.com/nhn/tui.date-picker/issues\"><img src=\"https://img.shields.io/badge/PRs-welcome-ff69b4.svg\" alt=\"PRs welcome\"></a>\n<a href=\"https://github.com/nhn\"><img src=\"https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-NHN-ff1414.svg\" alt=\"code with hearth by NHN\"></a></p>\n<p><a href=\"https://nhn.github.io/tui.date-picker/latest/\"><img src=\"https://user-images.githubusercontent.com/8615506/64501774-cc709580-d2fd-11e9-98f0-f7b89376c986.gif\" /></a></p>\n<h2>🚩 Table of Contents</h2>\n<ul>\n<li><a href=\"#Collect-statistics-on-the-use-of-open-source\">Collect statistics on the use of open source</a></li>\n<li><a href=\"#-documents\">Documents</a></li>\n<li><a href=\"#-features\">Features</a></li>\n<li><a href=\"#-examples\">Examples</a></li>\n<li><a href=\"#-install\">Install</a></li>\n<li><a href=\"#-usage\">Usage</a></li>\n<li><a href=\"#-dependency\">Dependency</a></li>\n<li><a href=\"#-browser-support\">Browser Support</a></li>\n<li><a href=\"#-pull-request-steps\">Pull Request Steps</a></li>\n<li><a href=\"#-contributing\">Contributing</a></li>\n<li><a href=\"#-toast-ui-family\">TOAST UI Family</a></li>\n<li><a href=\"#-license\">License</a></li>\n</ul>\n<h2>Collect statistics on the use of open source</h2>\n<p>TOAST UI DatePicker applies Google Analytics (GA) to collect statistics on the use of open source, in order to identify how widely TOAST UI DatePicker is used throughout the world.\nIt also serves as important index to determine the future course of projects.\n<code class=\"tui-language-text\">location.hostname</code> (e.g. > “ui.toast.com\") is to be collected and the sole purpose is nothing but to measure statistics on the usage.</p>\n<p>To disable GA, use the following <code class=\"tui-language-text\">usageStatistics</code> option when creating the instance.</p>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"tui-language-js\"><code class=\"tui-language-js\"><span class=\"token keyword\">var</span> options <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token operator\">...</span>\n    usageStatistics<span class=\"token punctuation\">:</span> <span class=\"token boolean\">false</span>\n<span class=\"token punctuation\">}</span>\n<span class=\"token keyword\">var</span> instance <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">DatePicker</span><span class=\"token punctuation\">(</span>container<span class=\"token punctuation\">,</span> options<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<p>Or, include <a href=\"https://github.com/nhn/tui.code-snippet\"><code class=\"tui-language-text\">tui-code-snippet</code></a>(<strong>v2.2.0</strong> or <strong>later</strong>) and then immediately write the options as follows:</p>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"tui-language-js\"><code class=\"tui-language-js\">tui<span class=\"token punctuation\">.</span>usageStatistics <span class=\"token operator\">=</span> <span class=\"token boolean\">false</span><span class=\"token punctuation\">;</span></code></pre></div>\n<h2>📙 Documents</h2>\n<ul>\n<li><a href=\"https://github.com/nhn/tui.date-picker/blob/production/docs/getting-started.md\">Getting Started</a></li>\n<li><a href=\"https://github.com/nhn/tui.date-picker/tree/production/docs\">Tutorials</a></li>\n<li><a href=\"https://nhn.github.io/tui.date-picker/latest\">APIs</a></li>\n<li><a href=\"https://github.com/nhn/tui.date-picker/blob/master/docs/getting-started.md#v400-migration-guide\">v4.0.0 Migration Guide</a></li>\n</ul>\n<p>You can also see the older versions of API page on the <a href=\"https://github.com/nhn/tui.date-picker/releases\">releases page</a>.</p>\n<h2>🎨 Features</h2>\n<ul>\n<li>Selects specific year, month, date, and time.</li>\n<li>Creates the calendar that only show date-layer using <code class=\"tui-language-text\">createCalendar</code> API.</li>\n<li>Creates the range picker that selects a date period using <code class=\"tui-language-text\">createRangePicker</code> API.</li>\n<li>Supports internationalization(i18n).</li>\n<li>Supports custom events.</li>\n<li>Provides the file of default css style.</li>\n</ul>\n<h2>🐾 Examples</h2>\n<ul>\n<li><a href=\"https://nhn.github.io/tui.date-picker/latest/tutorial-example01-basic\">Basic</a> : Example of using default options.</li>\n<li><a href=\"https://nhn.github.io/tui.date-picker/latest/tutorial-example04-having-timepicker\">Having Timepicker</a> :  Example of using a time picker to select a time.</li>\n<li><a href=\"https://nhn.github.io/tui.date-picker/latest/tutorial-example07-calendar\">Calendar</a> : Examples of creating and using calendars.</li>\n<li><a href=\"https://nhn.github.io/tui.date-picker/latest/tutorial-example08-daterangepicker\">RangePicker</a> : Example of creating and using a range picker.</li>\n</ul>\n<p>More examples can be found on the left sidebar of each example page, and have fun with it.</p>\n<h2>💾 Install</h2>\n<p>TOAST UI products can be used by using the package manager or downloading the source directly.\nHowever, we highly recommend using the package manager.</p>\n<h3>Via Package Manager</h3>\n<p>TOAST UI products are registered in two package managers, <a href=\"https://www.npmjs.com/\">npm</a> and <a href=\"https://bower.io/\">bower</a>.\nYou can conveniently install it using the commands provided by each package manager.\nWhen using npm, be sure to use it in the environment <a href=\"https://nodejs.org/ko/\">Node.js</a> is installed.</p>\n<h4>npm</h4>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"tui-language-sh\"><code class=\"tui-language-sh\">$ npm install --save tui-date-picker # Latest version\n$ npm install --save tui-date-picker@&lt;version&gt; # Specific version</code></pre></div>\n<h4>bower</h4>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"tui-language-sh\"><code class=\"tui-language-sh\">$ bower install tui-date-picker # Latest version\n$ bower install tui-date-picker#&lt;tag&gt; # Specific version</code></pre></div>\n<h3>Via Contents Delivery Network (CDN)</h3>\n<p>TOAST UI products are available over a CDN powered by <a href=\"https://www.toast.com\">TOAST Cloud</a>.</p>\n<p>You can use CDN as below.</p>\n<div class=\"gatsby-highlight\" data-language=\"html\"><pre class=\"tui-language-html\"><code class=\"tui-language-html\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>link</span> <span class=\"token attr-name\">rel</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>stylesheet<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">href</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>https://uicdn.toast.com/tui.date-picker/latest/tui-date-picker.css<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>script</span> <span class=\"token attr-name\">src</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>https://uicdn.toast.com/tui.date-picker/latest/tui-date-picker.js<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span><span class=\"token script\"></span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>script</span><span class=\"token punctuation\">></span></span></code></pre></div>\n<p>If you want to use a specific version, use the tag name instead of <code class=\"tui-language-text\">latest</code> in the url's path.</p>\n<p>The CDN directory has the following structure.</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"tui-language-text\"><code class=\"tui-language-text\">tui.date-picker/\n├─ latest\n│  ├─ tui-date-picker.css\n│  ├─ tui-date-picker.js\n│  ├─ tui-date-picker.min.css\n│  └─ tui-date-picker.min.js\n├─ v4.0.0/\n│  ├─ ...</code></pre></div>\n<h3>Download Source Files</h3>\n<ul>\n<li><a href=\"https://github.com/nhn/tui.date-picker/tree/production/dist\">Download bundle files</a></li>\n<li><a href=\"https://github.com/nhn/tui.date-picker/releases\">Download all sources for each version</a></li>\n</ul>\n<h2>🔨 Usage</h2>\n<h3>HTML</h3>\n<p>You need to add two elements.\nOne is the container element to display a date picker, and the other is a target element in which a date picker is attached.\nAlso add some elements for applying the css style.</p>\n<div class=\"gatsby-highlight\" data-language=\"html\"><pre class=\"tui-language-html\"><code class=\"tui-language-html\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>div</span> <span class=\"token attr-name\">class</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>tui-datepicker-input tui-datetime-input tui-has-focus<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>input</span> <span class=\"token attr-name\">type</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>text<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">id</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>tui-date-picker-target<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">aria-label</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>Date-Time<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>span</span> <span class=\"token attr-name\">class</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>tui-ico-date<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>span</span><span class=\"token punctuation\">></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>div</span><span class=\"token punctuation\">></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>div</span> <span class=\"token attr-name\">id</span><span class=\"token attr-value\"><span class=\"token punctuation\">=</span><span class=\"token punctuation\">\"</span>tui-date-picker-container<span class=\"token punctuation\">\"</span></span><span class=\"token style-attr language-css\"><span class=\"token attr-name\"> <span class=\"token attr-name\">style</span></span><span class=\"token punctuation\">=\"</span><span class=\"token attr-value\"><span class=\"token property\">margin-top</span><span class=\"token punctuation\">:</span> -1px<span class=\"token punctuation\">;</span></span><span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>div</span><span class=\"token punctuation\">></span></span></code></pre></div>\n<h3>JavaScript</h3>\n<p>This can be used by creating an instance with the constructor function.\nTo get the constructor function, you should import the module using one of the following ways depending on your environment.</p>\n<h4>Using namespace in browser environment</h4>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"tui-language-javascript\"><code class=\"tui-language-javascript\"><span class=\"token keyword\">var</span> DatePicker <span class=\"token operator\">=</span> tui<span class=\"token punctuation\">.</span>DatePicker<span class=\"token punctuation\">;</span></code></pre></div>\n<h4>Using module format in node environment</h4>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"tui-language-javascript\"><code class=\"tui-language-javascript\"><span class=\"token keyword\">var</span> DatePicker <span class=\"token operator\">=</span> <span class=\"token function\">require</span><span class=\"token punctuation\">(</span><span class=\"token string\">'tui-date-picker'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span> <span class=\"token comment\">/* CommonJS */</span></code></pre></div>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"tui-language-javascript\"><code class=\"tui-language-javascript\"><span class=\"token keyword\">import</span> DatePicker <span class=\"token keyword\">from</span> <span class=\"token string\">'tui-date-picker'</span><span class=\"token punctuation\">;</span> <span class=\"token comment\">/* ES6 */</span></code></pre></div>\n<p>You can create an instance with <a href=\"http://nhn.github.io/tui.date-picker/latest/DatePicker\">options</a> and call various APIs after creating an instance.</p>\n<div class=\"gatsby-highlight\" data-language=\"javascript\"><pre class=\"tui-language-javascript\"><code class=\"tui-language-javascript\"><span class=\"token keyword\">var</span> container <span class=\"token operator\">=</span> document<span class=\"token punctuation\">.</span><span class=\"token function\">getElementById</span><span class=\"token punctuation\">(</span><span class=\"token string\">'tui-date-picker-container'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">var</span> target <span class=\"token operator\">=</span> document<span class=\"token punctuation\">.</span><span class=\"token function\">getElementById</span><span class=\"token punctuation\">(</span><span class=\"token string\">'tui-date-picker-target'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token keyword\">var</span> instance <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">DatePicker</span><span class=\"token punctuation\">(</span>container<span class=\"token punctuation\">,</span> <span class=\"token punctuation\">{</span>\n    input<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n        element<span class=\"token punctuation\">:</span> target\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n    <span class=\"token operator\">...</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\ninstance<span class=\"token punctuation\">.</span><span class=\"token function\">getDate</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<p>For more information about the API, please see <a href=\"http://nhn.github.io/tui.date-picker/latest/DatePicker\">here</a>.</p>\n<h2>🔩 Dependency</h2>\n<ul>\n<li><a href=\"https://github.com/nhn/tui.code-snippet\">tui-code-snippet</a> >= 2.2.0</li>\n<li><a href=\"https://github.com/nhn/tui.time-picker\">tui-time-picker</a> >= 2.0.3</li>\n</ul>\n<h2>🌏 Browser Support</h2>\n<table>\n<thead>\n<tr>\n<th align=\"center\"><img src=\"https://user-images.githubusercontent.com/1215767/34348387-a2e64588-ea4d-11e7-8267-a43365103afe.png\" alt=\"Chrome\" width=\"16px\" height=\"16px\" /> Chrome</th>\n<th align=\"center\"><img src=\"https://user-images.githubusercontent.com/1215767/34348590-250b3ca2-ea4f-11e7-9efb-da953359321f.png\" alt=\"IE\" width=\"16px\" height=\"16px\" /> Internet Explorer</th>\n<th align=\"center\"><img src=\"https://user-images.githubusercontent.com/1215767/34348380-93e77ae8-ea4d-11e7-8696-9a989ddbbbf5.png\" alt=\"Edge\" width=\"16px\" height=\"16px\" /> Edge</th>\n<th align=\"center\"><img src=\"https://user-images.githubusercontent.com/1215767/34348394-a981f892-ea4d-11e7-9156-d128d58386b9.png\" alt=\"Safari\" width=\"16px\" height=\"16px\" /> Safari</th>\n<th align=\"center\"><img src=\"https://user-images.githubusercontent.com/1215767/34348383-9e7ed492-ea4d-11e7-910c-03b39d52f496.png\" alt=\"Firefox\" width=\"16px\" height=\"16px\" /> Firefox</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"center\">Yes</td>\n<td align=\"center\">8+</td>\n<td align=\"center\">Yes</td>\n<td align=\"center\">Yes</td>\n<td align=\"center\">Yes</td>\n</tr>\n</tbody>\n</table>\n<h2>🔧 Pull Request Steps</h2>\n<p>TOAST UI products are open source, so you can create a pull request(PR) after you fix issues.\nRun npm scripts and develop yourself with the following process.</p>\n<h3>Setup</h3>\n<p>Fork <code class=\"tui-language-text\">develop</code> branch into your personal repository.\nClone it to local computer. Install node modules.\nBefore starting development, you should check to haveany errors.</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"tui-language-sh\"><code class=\"tui-language-sh\">$ git clone https://github.com/{your-personal-repo}/tui.date-picker.git\n$ cd tui.date-picker\n$ npm install\n$ npm run test</code></pre></div>\n<h3>Develop</h3>\n<p>Let's start development!\nYou can see your code is reflected as soon as you saving the codes by running a server.\nDon't miss adding test cases and then make green rights.</p>\n<h4>Run webpack-dev-server</h4>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"tui-language-sh\"><code class=\"tui-language-sh\">$ npm run serve\n$ npm run serve:ie8 # Run on Internet Explorer 8</code></pre></div>\n<h4>Run karma test</h4>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"tui-language-sh\"><code class=\"tui-language-sh\">$ npm run test</code></pre></div>\n<h3>Pull Request</h3>\n<p>Before PR, check to test lastly and then check any errors.\nIf it has no error, commit and then push it!</p>\n<p>For more information on PR's step, please see links of Contributing section.</p>\n<h2>💬 Contributing</h2>\n<ul>\n<li><a href=\"https://github.com/nhn/tui.date-picker/blob/production/CODE_OF_CONDUCT.md\">Code of Conduct</a></li>\n<li><a href=\"https://github.com/nhn/tui.date-picker/blob/production/CONTRIBUTING.md\">Contributing guideline</a></li>\n<li><a href=\"https://github.com/nhn/tui.date-picker/blob/production/docs/ISSUE_TEMPLATE.md\">Issue guideline</a></li>\n<li><a href=\"https://github.com/nhn/tui.date-picker/blob/production/docs/COMMIT_MESSAGE_CONVENTION.md\">Commit convention</a></li>\n</ul>\n<h2>🍞 TOAST UI Family</h2>\n<ul>\n<li><a href=\"https://github.com/nhn/tui.editor\">TOAST UI Editor</a></li>\n<li><a href=\"https://github.com/nhn/tui.calendar\">TOAST UI Calendar</a></li>\n<li><a href=\"https://github.com/nhn/tui.chart\">TOAST UI Chart</a></li>\n<li><a href=\"https://github.com/nhn/tui.image-editor\">TOAST UI Image-Editor</a></li>\n<li><a href=\"https://github.com/nhn/tui.grid\">TOAST UI Grid</a></li>\n<li><a href=\"https://github.com/nhn\">TOAST UI Components</a></li>\n</ul>\n<h2>📜 License</h2>\n<p>This software is licensed under the <a href=\"https://github.com/nhn/tui.date-picker/blob/production/LICENSE\">MIT</a> © <a href=\"https://github.com/nhn\">NHN</a>.</p>"}}]}},"pageContext":{"isCreatedByStatefulCreatePages":true}}}