具体样式

<div class="form-group" id="test6" style="padding-left:24px;">
                <div style="float: left;">
                    <input type="text" class="form-control" autocomplete="off" id="test-startDate-1"
                        placeholder="开始日期">
                </div>
                <span style="float: left;margin-top: 5px;">&nbsp;&nbsp;-&nbsp;&nbsp;</span>
                <div style="float: left;">
                    <input type="text" class="form-control" autocomplete="off" id="test-endDate-1"
                        placeholder="结束日期">
                </div>
            </div>

ts ngOnInit中

laydate.render({
            elem: '#test6',
            theme: '#0c6acf',
            range: ['#test-startDate-1', '#test-endDate-1'],
            done: (value, date, endDate) => {
                console.log(value)
                console.log(date)
                console.log(endDate)
            }
        })

erysemM
1 声望0 粉丝