Ecarts comes with the date formatting method formattime echarts.format.formatTime('yyyy-MM-dd', +new Date()); //"2021-02-25"