DatePicker箭头问题

时间:2018-12-23 12:38:22

标签: reactjs material-ui

我已经在页面上添加了DatePicker,但是我有点像这样,为什么它会发生?我应该在index.html中添加一些标记,还是应该怎么做?

calendar

import 'date-fns'
import React from 'react'
import DateFnsUtils from '@date-io/date-fns'
import { MuiPickersUtilsProvider, DatePicker } from 'material-ui-pickers'

function DatePickerField (
  {
    input,
    className,
    selectedDate,
    input: { name, onChange, value },
    label,
    meta: { touched, error },
    required,
    ...restProps
  }
) {
  return (
    <MuiPickersUtilsProvider
      utils={DateFnsUtils}
      className={className}
      required={required}
      error={!!(touched && error)}
    >
      <DatePicker
        {...restProps}
        label={label}
        value={selectedDate}
        onChange={(event, value) => input.onChange(event, value)}
        name={name}
      />
    </MuiPickersUtilsProvider>
  )
}

export default DatePickerField

1 个答案:

答案 0 :(得分:0)

https://material-ui-pickers.firebaseapp.com/installation-在这里您可以找到响应,在index.html文件<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">

中添加此标签