小编Man*_*Vas的帖子

React Datepicker CSS 搞砸了

我正在使用 HackerOne 的这个模块: https: //reactdatepicker.com

将模块安装并导入到我的项目后,我决定从站点中选择“选择时间”组件。

我的代码

import React, { Component } from "react";
import { Form, Button } from "react-bootstrap"
import DatePicker from "react-datepicker"

export default class AddEventModal extends Component {

    constructor(props) {
        super(props)

        this.state = {
            date: new Date()
        }
    }

    render() {
        return (
            <Form>
                <Form.Group controlId="formBasicEmail">
                    <Form.Label>Title <span style={{ color: "red" }}>*</span></Form.Label>
                    <Form.Control type="text" placeholder="Enter a Title" className="col-6" />
                    <Form.Text className="text-muted">
                        Enter a Title for your Event.
                        </Form.Text>
                </Form.Group>

                <Form.Group controlId="formBasicPassword">
                    <Form.Label>Description</Form.Label>
                    <Form.Control type="text" placeholder="Enter a …
Run Code Online (Sandbox Code Playgroud)

css datepicker reactjs react-bootstrap react-datepicker

1
推荐指数
1
解决办法
2225
查看次数