diff options
author | yiminghe <yiminghe@gmail.com> | 2016-02-22 10:41:35 +0800 |
---|---|---|
committer | yiminghe <yiminghe@gmail.com> | 2016-02-22 10:41:35 +0800 |
commit | 5894e17c2a086ba4296a28b447795a6733835e97 (patch) | |
tree | df6371b063125c489daff96bd7d7e1bb97766c9b /examples | |
parent | 0afde9e82d2042249eff1e5c8dcbc38469e32884 (diff) | |
download | time-picker-5894e17c2a086ba4296a28b447795a6733835e97.tar.gz time-picker-5894e17c2a086ba4296a28b447795a6733835e97.tar.zst time-picker-5894e17c2a086ba4296a28b447795a6733835e97.zip |
Updates
Diffstat (limited to 'examples')
-rw-r--r-- | examples/disabled.html | 18 | ||||
-rw-r--r-- | examples/disabled.js.map | 2 | ||||
-rw-r--r-- | examples/hidden.html | 4 | ||||
-rw-r--r-- | examples/pick-time.html | 4 | ||||
-rw-r--r-- | examples/value-and-defaultValue.html | 4 |
5 files changed, 16 insertions, 16 deletions
diff --git a/examples/disabled.html b/examples/disabled.html index 315bcd4..329424d 100644 --- a/examples/disabled.html +++ b/examples/disabled.html | |||
@@ -2,7 +2,7 @@ | |||
2 | <html> | 2 | <html> |
3 | 3 | ||
4 | <head> | 4 | <head> |
5 | <title>disabled.js - example - rc-time-picker@1.1.1</title> | 5 | <title>disabled.js - example - rc-time-picker@1.1.3</title> |
6 | <meta name="viewport" | 6 | <meta name="viewport" |
7 | content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> | 7 | content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> |
8 | <meta charset="utf-8"/> | 8 | <meta charset="utf-8"/> |
@@ -257,7 +257,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic | |||
257 | <body> | 257 | <body> |
258 | <div class="container"> | 258 | <div class="container"> |
259 | <div class="header"> | 259 | <div class="header"> |
260 | <h1>rc-time-picker@1.1.1</h1> | 260 | <h1>rc-time-picker@1.1.3</h1> |
261 | 261 | ||
262 | <p>React TimePicker</p> | 262 | <p>React TimePicker</p> |
263 | </div> | 263 | </div> |
@@ -305,12 +305,12 @@ now.setTime(<span class="hljs-built_in">Date</span>.now()); | |||
305 | 305 | ||
306 | <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">disabledMinutes</span><span class="hljs-params">(h)</span> </span>{ | 306 | <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">disabledMinutes</span><span class="hljs-params">(h)</span> </span>{ |
307 | <span class="hljs-keyword">switch</span> (h) { | 307 | <span class="hljs-keyword">switch</span> (h) { |
308 | <span class="hljs-keyword">case</span> <span class="hljs-number">9</span>: | 308 | <span class="hljs-keyword">case</span> <span class="hljs-number">9</span>: |
309 | <span class="hljs-keyword">return</span> generateOptions(<span class="hljs-number">60</span>, [<span class="hljs-number">30</span>]); | 309 | <span class="hljs-keyword">return</span> generateOptions(<span class="hljs-number">60</span>, [<span class="hljs-number">30</span>]); |
310 | <span class="hljs-keyword">case</span> <span class="hljs-number">21</span>: | 310 | <span class="hljs-keyword">case</span> <span class="hljs-number">21</span>: |
311 | <span class="hljs-keyword">return</span> generateOptions(<span class="hljs-number">60</span>, [<span class="hljs-number">0</span>]); | 311 | <span class="hljs-keyword">return</span> generateOptions(<span class="hljs-number">60</span>, [<span class="hljs-number">0</span>]); |
312 | <span class="hljs-keyword">default</span>: | 312 | <span class="hljs-keyword">default</span>: |
313 | <span class="hljs-keyword">return</span> generateOptions(<span class="hljs-number">60</span>, [<span class="hljs-number">0</span>, <span class="hljs-number">30</span>]); | 313 | <span class="hljs-keyword">return</span> generateOptions(<span class="hljs-number">60</span>, [<span class="hljs-number">0</span>, <span class="hljs-number">30</span>]); |
314 | } | 314 | } |
315 | } | 315 | } |
316 | 316 | ||
@@ -326,7 +326,7 @@ ReactDom.render( | |||
326 | <span class="hljs-attribute">onChange</span>=<span class="hljs-value">{onChange}</span> | 326 | <span class="hljs-attribute">onChange</span>=<span class="hljs-value">{onChange}</span> |
327 | <span class="hljs-attribute">disabledHours</span>=<span class="hljs-value">{disabledHours}</span> | 327 | <span class="hljs-attribute">disabledHours</span>=<span class="hljs-value">{disabledHours}</span> |
328 | <span class="hljs-attribute">disabledMinutes</span>=<span class="hljs-value">{disabledMinutes}</span> | 328 | <span class="hljs-attribute">disabledMinutes</span>=<span class="hljs-value">{disabledMinutes}</span> |
329 | <span class="hljs-attribute">disabledSeconds</span>=<span class="hljs-value">{disabledSeconds}</span> /></span>, | 329 | <span class="hljs-attribute">disabledSeconds</span>=<span class="hljs-value">{disabledSeconds}</span>/></span>, |
330 | document.getElementById('__react-content') | 330 | document.getElementById('__react-content') |
331 | ); | 331 | ); |
332 | </span></code></pre></div> | 332 | </span></code></pre></div> |
diff --git a/examples/disabled.js.map b/examples/disabled.js.map index 9cdb565..3a4fd18 100644 --- a/examples/disabled.js.map +++ b/examples/disabled.js.map | |||
@@ -1 +1 @@ | |||
{"version":3,"sources":["webpack:///./examples/disabled.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;qBAEO,CAAkC;;kCAEvB,CAAO;;;;qCACJ,GAAW;;;;8CAEF,GAAoB;;;;oDACvB,GAA2B;;;;yCAE/B,GAAgB;;;;uDACV,GAAiC;;;;AAE9D,KAAM,UAAU,GAAG,IAAI,CAAC;AACxB,KAAM,GAAG,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;;AAE9C,KAAM,SAAS,GAAG,yCAAmB,GAAG,CAAC,CAAC;;AAE1C,KAAM,GAAG,GAAG,mCAAsB,wCAAiB,QAAQ,CAAC,CAAC;AAC7D,IAAG,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;;AAExB,UAAS,eAAe,CAAC,MAAM,EAAE,eAAe,EAAE;AAChD,OAAM,GAAG,GAAG,EAAE,CAAC;AACf,QAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,EAAE,KAAK,EAAE,EAAE;AAC3C,SAAI,eAAe,CA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:0 */\n\nimport 'rc-time-picker/assets/index.less';\n\nimport React from 'react';\nimport ReactDom from 'react-dom';\n\nimport GregorianCalendar from 'gregorian-calendar';\nimport DateTimeFormat from 'gregorian-calendar-format';\n\nimport TimePicker from 'rc-time-picker';\nimport TimePickerLocale from 'rc-time-picker/src/locale/zh_CN';\n\nconst showSecond = true;\nconst str = showSecond ? 'HH:mm:ss' : 'HH:mm';\n\nconst formatter = new DateTimeFormat(str);\n\nconst now = new GregorianCalendar(TimePickerLocale.calendar);\nnow.setTime(Date.now());\n\nfunction generateOptions(length, excludedOptions) {\n const arr = [];\n for (let value = 0; value < length; value++) {\n if (excludedOptions.indexOf(value) < 0) {\n arr.push(value);\n }\n }\n return arr;\n}\n\nfunction onChange(value) {\n console.log(value && formatter.format(value));\n}\n\nfunction disabledHours() {\n return [0, 1, 2, 3, 4, 5, 6, 7, 8, 22, 23];\n}\n\nfunction disabledMinutes(h) {\n switch (h) {\n case 9:\n return generateOptions(60, [30]);\n case 21:\n return generateOptions(60, [0]);\n default:\n return generateOptions(60, [0, 30]);\n }\n}\n\nfunction disabledSeconds(h, m) {\n return [h + m % 60];\n}\n\nReactDom.render(\n <TimePicker formatter={formatter} locale={TimePickerLocale}\n showSecond={showSecond}\n defaultValue={now}\n className=\"xxx\"\n onChange={onChange}\n disabledHours={disabledHours}\n disabledMinutes={disabledMinutes}\n disabledSeconds={disabledSeconds} />,\n document.getElementById('__react-content')\n);\n\n\n\n/** WEBPACK FOOTER **\n ** ./examples/disabled.js\n **/"],"sourceRoot":""} \ No newline at end of file | {"version":3,"sources":["webpack:///./examples/disabled.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;qBAEO,CAAkC;;kCAEvB,CAAO;;;;qCACJ,GAAW;;;;8CAEF,GAAoB;;;;oDACvB,GAA2B;;;;yCAE/B,GAAgB;;;;uDACV,GAAiC;;;;AAE9D,KAAM,UAAU,GAAG,IAAI,CAAC;AACxB,KAAM,GAAG,GAAG,UAAU,GAAG,UAAU,G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AC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;EACrB;;AAED,uBAAS,MAAM,CACb,8DAAY,SAAS,EAAE,SAAU,EAAC,MAAM,yCAAmB;AAC/C,aAAU,EAAE,UAAW;AACvB,eAAY,EAAE,GAAI;AAClB,YAAS,EAAC,KAAK;AACf,WAAQ,EAAE,QAAS;AACnB,gBAAa,EAAE,aAAc;AAC7B,kBAAe,EAAE,eAAgB;AACjC,kBAAe,EAAE,eAAgB,GAAE,EAC/C,QAAQ,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAC3C,C","file":"disabled.js","sourcesContent":["/* eslint no-console:0 */\n\nimport 'rc-time-picker/assets/index.less';\n\nimport React from 'react';\nimport ReactDom from 'react-dom';\n\nimport GregorianCalendar from 'gregorian-calendar';\nimport DateTimeFormat from 'gregorian-calendar-format';\n\nimport TimePicker from 'rc-time-picker';\nimport TimePickerLocale from 'rc-time-picker/src/locale/zh_CN';\n\nconst showSecond = true;\nconst str = showSecond ? 'HH:mm:ss' : 'HH:mm';\n\nconst formatter = new DateTimeFormat(str);\n\nconst now = new GregorianCalendar(TimePickerLocale.calendar);\nnow.setTime(Date.now());\n\nfunction generateOptions(length, excludedOptions) {\n const arr = [];\n for (let value = 0; value < length; value++) {\n if (excludedOptions.indexOf(value) < 0) {\n arr.push(value);\n }\n }\n return arr;\n}\n\nfunction onChange(value) {\n console.log(value && formatter.format(value));\n}\n\nfunction disabledHours() {\n return [0, 1, 2, 3, 4, 5, 6, 7, 8, 22, 23];\n}\n\nfunction disabledMinutes(h) {\n switch (h) {\n case 9:\n return generateOptions(60, [30]);\n case 21:\n return generateOptions(60, [0]);\n default:\n return generateOptions(60, [0, 30]);\n }\n}\n\nfunction disabledSeconds(h, m) {\n return [h + m % 60];\n}\n\nReactDom.render(\n <TimePicker formatter={formatter} locale={TimePickerLocale}\n showSecond={showSecond}\n defaultValue={now}\n className=\"xxx\"\n onChange={onChange}\n disabledHours={disabledHours}\n disabledMinutes={disabledMinutes}\n disabledSeconds={disabledSeconds}/>,\n document.getElementById('__react-content')\n);\n\n\n\n/** WEBPACK FOOTER **\n ** ./examples/disabled.js\n **/"],"sourceRoot":""} \ No newline at end of file | ||
diff --git a/examples/hidden.html b/examples/hidden.html index e880e72..2e049dc 100644 --- a/examples/hidden.html +++ b/examples/hidden.html | |||
@@ -2,7 +2,7 @@ | |||
2 | <html> | 2 | <html> |
3 | 3 | ||
4 | <head> | 4 | <head> |
5 | <title>hidden.js - example - rc-time-picker@1.1.1</title> | 5 | <title>hidden.js - example - rc-time-picker@1.1.3</title> |
6 | <meta name="viewport" | 6 | <meta name="viewport" |
7 | content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> | 7 | content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> |
8 | <meta charset="utf-8"/> | 8 | <meta charset="utf-8"/> |
@@ -257,7 +257,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic | |||
257 | <body> | 257 | <body> |
258 | <div class="container"> | 258 | <div class="container"> |
259 | <div class="header"> | 259 | <div class="header"> |
260 | <h1>rc-time-picker@1.1.1</h1> | 260 | <h1>rc-time-picker@1.1.3</h1> |
261 | 261 | ||
262 | <p>React TimePicker</p> | 262 | <p>React TimePicker</p> |
263 | </div> | 263 | </div> |
diff --git a/examples/pick-time.html b/examples/pick-time.html index 4150df3..06a2a68 100644 --- a/examples/pick-time.html +++ b/examples/pick-time.html | |||
@@ -2,7 +2,7 @@ | |||
2 | <html> | 2 | <html> |
3 | 3 | ||
4 | <head> | 4 | <head> |
5 | <title>pick-time.js - example - rc-time-picker@1.1.1</title> | 5 | <title>pick-time.js - example - rc-time-picker@1.1.3</title> |
6 | <meta name="viewport" | 6 | <meta name="viewport" |
7 | content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> | 7 | content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> |
8 | <meta charset="utf-8"/> | 8 | <meta charset="utf-8"/> |
@@ -257,7 +257,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic | |||
257 | <body> | 257 | <body> |
258 | <div class="container"> | 258 | <div class="container"> |
259 | <div class="header"> | 259 | <div class="header"> |
260 | <h1>rc-time-picker@1.1.1</h1> | 260 | <h1>rc-time-picker@1.1.3</h1> |
261 | 261 | ||
262 | <p>React TimePicker</p> | 262 | <p>React TimePicker</p> |
263 | </div> | 263 | </div> |
diff --git a/examples/value-and-defaultValue.html b/examples/value-and-defaultValue.html index be94e57..6c6f53e 100644 --- a/examples/value-and-defaultValue.html +++ b/examples/value-and-defaultValue.html | |||
@@ -2,7 +2,7 @@ | |||
2 | <html> | 2 | <html> |
3 | 3 | ||
4 | <head> | 4 | <head> |
5 | <title>value-and-defaultValue.js - example - rc-time-picker@1.1.1</title> | 5 | <title>value-and-defaultValue.js - example - rc-time-picker@1.1.3</title> |
6 | <meta name="viewport" | 6 | <meta name="viewport" |
7 | content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> | 7 | content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> |
8 | <meta charset="utf-8"/> | 8 | <meta charset="utf-8"/> |
@@ -257,7 +257,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic | |||
257 | <body> | 257 | <body> |
258 | <div class="container"> | 258 | <div class="container"> |
259 | <div class="header"> | 259 | <div class="header"> |
260 | <h1>rc-time-picker@1.1.1</h1> | 260 | <h1>rc-time-picker@1.1.3</h1> |
261 | 261 | ||
262 | <p>React TimePicker</p> | 262 | <p>React TimePicker</p> |
263 | </div> | 263 | </div> |