From 3bf8521fe007374bfef5ebdcc653d69797b223f8 Mon Sep 17 00:00:00 2001 From: ZeXiangTeo Date: Tue, 18 Aug 2020 11:21:55 +0800 Subject: [PATCH 1/3] add Title to full calendar --- examples/full-calendar.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/full-calendar.js b/examples/full-calendar.js index 2cf7ed64b..88c4ec1de 100644 --- a/examples/full-calendar.js +++ b/examples/full-calendar.js @@ -10,10 +10,10 @@ import Select from 'rc-select'; import zhCN from 'rc-calendar/src/locale/zh_CN'; import enUS from 'rc-calendar/src/locale/en_US'; - import moment from 'moment'; import 'moment/locale/zh-cn'; import 'moment/locale/en-gb'; +import setTitle from './setTitle.js'; const format = 'YYYY-MM-DD'; const cn = location.search.indexOf('cn') !== -1; @@ -37,6 +37,10 @@ class Demo extends React.Component { type: 'month', }; + componentDidMount() { + setTitle('Full Calendar'); + } + onTypeChange = (type) => { this.setState({ type, From 503b2787681b8986893bde2b3a6888a9fe88066d Mon Sep 17 00:00:00 2001 From: ZeXiangTeo Date: Tue, 18 Aug 2020 11:40:36 +0800 Subject: [PATCH 2/3] Calendar title code edit --- examples/full-calendar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/full-calendar.js b/examples/full-calendar.js index 88c4ec1de..cd0402bf6 100644 --- a/examples/full-calendar.js +++ b/examples/full-calendar.js @@ -11,9 +11,9 @@ import Select from 'rc-select'; import zhCN from 'rc-calendar/src/locale/zh_CN'; import enUS from 'rc-calendar/src/locale/en_US'; import moment from 'moment'; + import 'moment/locale/zh-cn'; import 'moment/locale/en-gb'; -import setTitle from './setTitle.js'; const format = 'YYYY-MM-DD'; const cn = location.search.indexOf('cn') !== -1; @@ -37,8 +37,8 @@ class Demo extends React.Component { type: 'month', }; - componentDidMount() { - setTitle('Full Calendar'); + componentWillMount() { + document.title = 'Full Calendar'; } onTypeChange = (type) => { From c075a294690689e79fb253863771153fb76035fa Mon Sep 17 00:00:00 2001 From: TeoZeXiang <68263313+TeoZeXiang@users.noreply.github.com> Date: Tue, 18 Aug 2020 12:02:48 +0800 Subject: [PATCH 3/3] Edit tab title --- examples/full-calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/full-calendar.js b/examples/full-calendar.js index cd0402bf6..6c4711536 100644 --- a/examples/full-calendar.js +++ b/examples/full-calendar.js @@ -38,7 +38,7 @@ class Demo extends React.Component { }; componentWillMount() { - document.title = 'Full Calendar'; + document.title = 'RC Full Calendar'; } onTypeChange = (type) => {