diff options
| author | Zog | 2018-01-25 22:10:07 -1000 |
|---|---|---|
| committer | Zog | 2018-01-25 22:10:07 -1000 |
| commit | 1a7365643b808617445e3a8051d13dcee3a820a4 (patch) | |
| tree | 88a1c334ef96849b843a542f60ab0a679f4b8a68 /app | |
| parent | 257f1bf2b02001605f8b7ec7e6fd894efad79f47 (diff) | |
| download | chouette-core-1a7365643b808617445e3a8051d13dcee3a820a4.tar.bz2 | |
Refs #5717; Fix month selection5717-fix-periods-on-timetables
Diffstat (limited to 'app')
| -rw-r--r-- | app/javascript/time_tables/actions/index.js | 1 | ||||
| -rw-r--r-- | app/javascript/time_tables/components/Navigate.js | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/app/javascript/time_tables/actions/index.js b/app/javascript/time_tables/actions/index.js index 787cee439..87c7a3e8d 100644 --- a/app/javascript/time_tables/actions/index.js +++ b/app/javascript/time_tables/actions/index.js @@ -156,7 +156,6 @@ const actions = { }), monthName(strDate) { let monthList = range(1,13).map(n => I18n.calendars.months[n]) - console.log("strDate: "+strDate) let date = new Date(strDate) return monthList[date.getUTCMonth()] }, diff --git a/app/javascript/time_tables/components/Navigate.js b/app/javascript/time_tables/components/Navigate.js index 64f05cb41..1467fffe9 100644 --- a/app/javascript/time_tables/components/Navigate.js +++ b/app/javascript/time_tables/components/Navigate.js @@ -24,7 +24,7 @@ export default function Navigate({ dispatch, metas, timetable, pagination, statu aria-haspopup='true' aria-expanded='true' > - {pagination.currentPage ? (actions.monthName(pagination.currentPage) + ' ' + new Date(pagination.currentPage).getFullYear()) : ''} + {pagination.currentPage ? (actions.monthName(pagination.currentPage) + ' ' + new Date(pagination.currentPage).getUTCFullYear()) : ''} <span className='caret'></span> </div> <ul @@ -41,7 +41,7 @@ export default function Navigate({ dispatch, metas, timetable, pagination, statu dispatch(actions.checkConfirmModal(e, actions.changePage(dispatch, e.currentTarget.value), pagination.stateChanged, dispatch, metas, timetable)) }} > - {actions.monthName(month) + ' ' + new Date(month).getFullYear()} + {actions.monthName(month) + ' ' + new Date(month).getUTCFullYear()} </button> </li> ))} @@ -86,4 +86,4 @@ Navigate.propTypes = { status: PropTypes.object.isRequired, pagination: PropTypes.object.isRequired, dispatch: PropTypes.func.isRequired -}
\ No newline at end of file +} |
