Ant Design DatePicker date selection box width problem

problem description

DatePicker date selection box setting width style is invalid

the environmental background of the problems and what methods you have tried

this can be achieved by adding style= "width: 100%" to the generated code < span class= "ant-." >. But this is the generated

related codes

/ / Please paste the code text below (do not replace the code with pictures)

<nz-form-item>
    <nz-form-label nzRequired>{{l("Birthday")}}</nz-form-label>
        <nz-form-control>
            <nz-date-picker style="width: 100%" [(ngModel)]="birthday" [ngModelOptions]="{standalone: true}"
              [nzDisabledDate]="disabledDate"></nz-date-picker>
    </nz-form-control>
</nz-form-item>

what result do you expect? What is the error message actually seen?

the width of the date selection box can take effect with my settings

Nov.16,2021

has it been solved? Ask


use the min-width attribute of style, for example:

style="min-width: 45%;"
Menu