Created
March 7, 2015 04:04
-
-
Save mwiencek/1ec0d53747ebaa9bff6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is part of MusicBrainz, the open internet music database. | |
// Copyright (C) 2015 MetaBrainz Foundation | |
// Licensed under the GPL version 2, or (at your option) any later version: | |
// http://www.gnu.org/licenses/gpl-2.0.txt | |
var React = require('react'); | |
var i18n = require('../../../common/i18n.js'); | |
var PartialDate = React.createClass({ | |
render: function () { | |
var date = this.props.date; | |
// var error = ??? | |
return ( | |
<tr> | |
<td class="section">{this.props.label}</td> | |
<td class="partial-date"> | |
<input value={date.year} maxlength="4" placeholder={i18n.l('YYYY')} size="4" /> | |
<input value={date.month} maxlength="2" placeholder={i18n.l('MM')} size="4" /> | |
<input value={date.day} maxlength="2" placeholder={i18n.l('DD')} size="4" /> | |
{error && <div class="error">{error}</div>} | |
</td> | |
</tr> | |
); | |
} | |
}); | |
module.exports = PartialDate; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment