rc-calendar
Advanced tools
Comparing version 1.2.1 to 1.2.2
/** @jsx React.DOM */ | ||
require(['../', | ||
'./CalendarInput', | ||
'/node_modules/gregorian-calendar/index', | ||
'/node_modules/gregorian-calendar-format/index', | ||
'../lib/MonthPanel', | ||
'../lib/YearPanel', | ||
'../lib/DecadePanel', | ||
'/node_modules/react/react' | ||
], function (Calendar, | ||
CalendarInput, | ||
GregorianCalendar, | ||
GregorianCalendarFormat, | ||
MonthPanel, | ||
YearPanel, | ||
DecadePanel, | ||
React) { | ||
var formatter = new GregorianCalendarFormat('yyyy-MM-dd'); | ||
var value = new GregorianCalendar(); | ||
value.setTime(Date.now()); | ||
function onSelect(value){ | ||
console.log('onSelect'); | ||
console.log(formatter.format(value)) | ||
} | ||
React.render( | ||
<div> | ||
<h2>calendar (en-us)</h2> | ||
<Calendar showWeekNumber="1" onSelect={onSelect}/> | ||
<h2>input (zh-cn)</h2> | ||
<CalendarInput /> | ||
</div>, document.getElementById('body')); | ||
/** @jsx React.DOM */ | ||
}); | ||
var Calendar = require('../'); | ||
var CalendarInput = require('./CalendarInput'); | ||
var GregorianCalendar = require('gregorian-calendar'); | ||
var GregorianCalendarFormat = require('gregorian-calendar-format'); | ||
var React = require('react'); | ||
var formatter = new GregorianCalendarFormat('yyyy-MM-dd'); | ||
var value = new GregorianCalendar(); | ||
value.setTime(Date.now()); | ||
function onSelect(value) { | ||
console.log('onSelect'); | ||
console.log(formatter.format(value)) | ||
} | ||
React.render( | ||
<div> | ||
<h2>calendar (en-us)</h2> | ||
<Calendar showWeekNumber="1" onSelect={onSelect}/> | ||
<h2>input (zh-cn)</h2> | ||
<CalendarInput /> | ||
</div>, document.getElementById('body')); |
{ | ||
"name": "rc-calendar", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "calendar ui component for react", | ||
@@ -40,4 +40,2 @@ "keywords": [ | ||
"gh-changelog": "^1.0.5", | ||
"gregorian-calendar": "^2.0.0", | ||
"gregorian-calendar-format": "^2.0.0", | ||
"gulp": "^3.8.7", | ||
@@ -89,2 +87,4 @@ "gulp-jscs": "^1.1.0", | ||
"dependencies": { | ||
"gregorian-calendar": "^2.0.0", | ||
"gregorian-calendar-format": "^2.0.0", | ||
"browserify-shim": "^3.8.0", | ||
@@ -91,0 +91,0 @@ "browserify-jsx": "^0.1.0" |
@@ -48,2 +48,4 @@ # rc-calendar | ||
For details to see: [https://github.com/yiminghe/learning-react/tree/master/example/rc-calendar](https://github.com/yiminghe/learning-react/tree/master/example/rc-calendar) | ||
## API | ||
@@ -50,0 +52,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
31
125
2
87933
4
2376
+ Addedgregorian-calendar@^2.0.0
+ Addedgregorian-calendar@2.0.5(transitive)
+ Addedgregorian-calendar-format@2.1.1(transitive)