material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[DatePicker] Can't inline two DatePickers

Open AleffHenrique opened this issue 10 years ago • 3 comments

I expected that these DatePickers were put side by side, but it just didn't happen. Why?

<div style={{width: "100%", height:"100%", display: "inline-block"}}>
    <DatePicker
        hintText="DatePicker 1" />
    <DatePicker
        hintText="DatePicker 2" />
</div>

AleffHenrique avatar Jan 24 '16 08:01 AleffHenrique

Guys, could someone confirm if this behavior is really expected or is a bug please? It really looks as a bug to me.

AleffHenrique avatar Jan 25 '16 09:01 AleffHenrique

Sorry for the delay, we've all been very busy recently :sweat_smile: How do you mean side by side? Do you mean the text fields being placed side by side? in that case you will need to apply the style={{display: "inline-block"}} to the date pickers. if you want them to open side by side then you should apply container="inline" to them and style it a little to get it open side by side.

alitaheri avatar Jan 28 '16 08:01 alitaheri

@AleffHenrique : Were you able to get it resolved using the above fix?

The above fix should be able to fix the inlining issue:

<DatePicker hintText="Portrait Dialog" style={{display: 'inline-block'}} /> <DatePicker hintText="Inline Dialog" style={{display: 'inline-block'}} />

screen shot 2016-04-14 at 10 42 42 am

I am closing this issue for now. Let us know if you still have one.

tintin1343 avatar Apr 14 '16 15:04 tintin1343