Blueprint: is it possible to add Icon in DateInput ?

Created on 8 Mar 2019  路  5Comments  路  Source: palantir/blueprint

I want Date Input to look like InputGroup with a left icon.

pretty standard look for date pickers to have a little calendar icon on the left.

i tried wrapping different elements but can't seem to get this to work

i want date-input to look like text-input:

https://blueprintjs.com/docs/#datetime/dateinput
https://blueprintjs.com/docs/#core/components/text-inputs.input-group

datetime question

Most helpful comment

<DateInput inputProps={{ leftIcon: "calendar" }} />

All 5 comments

yes, use inputProps, which allows you to set props on the underlying InputGroup

yes, use inputProps, which allows you to set props on the underlying InputGroup

thank you! could you elaborate or point to an example? not sure if i should be adding a DateINput to a input group?

<DateInput inputProps={{ leftIcon: "calendar" }} />

<DateInput inputProps={{ leftIcon: "calendar" }} />

interesting thanks! didn't realize you can do this.. essentially you figure out which control DateInput is using and then you know which InputProps are supported?

it's listed in the props documentation. you can click through all the types & interfaces in the docs to see their members

Was this page helpful?
0 / 5 - 0 ratings

Related issues

westrem picture westrem  路  3Comments

sighrobot picture sighrobot  路  3Comments

brsanthu picture brsanthu  路  3Comments

vilav picture vilav  路  3Comments

vinz243 picture vinz243  路  3Comments