Skip to content
This repository was archived by the owner on Nov 16, 2018. It is now read-only.

render weekdays title with moment's weekdaysMin! #192

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions src/DateTimePickerDays.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ export default class DateTimePickerDays extends Component {
}
return html;
}

renderWeekdays = () => {
var weekdays;
weekdays = moment.weekdaysMin();
return weekdays.map((item, index) => <th className="dow" key={index}>{item}</th>);
}

render() {
return (
Expand All @@ -82,19 +88,7 @@ export default class DateTimePickerDays extends Component {
</tr>

<tr>
<th className="dow">Su</th>

<th className="dow">Mo</th>

<th className="dow">Tu</th>

<th className="dow">We</th>

<th className="dow">Th</th>

<th className="dow">Fr</th>

<th className="dow">Sa</th>
{this.renderWeekdays()}
</tr>
</thead>

Expand Down