我有一个数组:
dates = [
"2019-10-04T12:38:02.506204+00:00",
"2019-10-04T14:59:39.370487+00:00",
"2019-10-04T14:59:50.897597+00:00",
"2019-10-04T14:59:57.344401+00:00",
"2019-10-04T15:00:04.631711+00:00",
"2019-10-04T15:00:13.460667+00:00",
"2019-10-04T15:00:21.672496+00:00",
"2019-10-04T15:00:29.643194+00:00",
"2019-10-04T15:00:37.022307+00:00",
"2019-10-04T15:01:00.134239+00:00",
"2019-10-04T15:01:08.146224+00:00",
"2019-10-04T15:01:15.205999+00:00",
"2019-10-04T15:01:21.877861+00:00",
"2019-10-04T15:01:28.089368+00:00",
"2019-10-04T16:29:05.438103+00:00",
"2019-10-04T16:29:49.927139+00:00",
"2019-10-05T16:35:00.994699+00:00",
"2019-10-06T08:45:47.289637+00:00",
"2019-10-06T08:46:11.294362+00:00",
"2019-10-06T08:46:23.702585+00:00",
"2019-10-06T08:46:33.374726+00:00",
"2019-10-06T08:46:42.726666+00:00",
"2019-10-06T08:46:52.916887+00:00",
"2019-10-06T08:47:02.659273+00:00",
"2019-10-06T16:08:14.975139+00:00",
"2019-10-06T16:08:29.047735+00:00",
"2019-10-06T16:08:42.831487+00:00",
"2019-10-06T16:08:58.472631+00:00",
"2019-10-07T08:32:43.248706+00:00",
"2019-10-07T08:37:00.512249+00:00",
"2019-10-07T08:38:12.188744+00:00",
"2019-10-07T08:40:08.362515+00:00",
"2019-10-07T08:41:57.151322+00:00",
"2019-10-07T08:46:52.107963+00:00",
"2019-10-07T08:53:38.604697+00:00",
"2019-10-07T08:53:53.449463+00:00",
"2019-10-07T09:15:31.659223+00:00"
]
我需要用两个按钮进行切换,第一个将向前切换日期,第二个将向后切换。使用数组中的日期。
请帮助JS。
慕妹3146593
相关分类