0

I'm working on an Angular 7 application with Project Clarity v1.0 as a design system.

I did many forms but facing some issue regarding Datepicker custom format.

I went through the documentation but there is no example or text about how to use custom date format, dis-allowed past/previous dates...etc something like ngx-bootstrap. They are mention each and everything about how much you can play around with date picker element.

Project Clarity Example

<form clrForm clrLayout="vertical">
  <input type="date" [(clrDate)]="date" newFormLayout="true">
</form>

I tried, angular way to setup custom date format as described into Stack Answer, but nothing like works. Can anyone have an idea about this?

USS
  • 460
  • 4
  • 16

1 Answers1

0

The Clarity Date Picker may not have all of the features of another date picker, and there are some enhancements in our backlog currently. If there is a specific issue that is missing, please search https://github.com/vmware/clarity/issues for existing issues or you may create a new one.

Also in this case, you shouldn't need to use newFormLayout="true" on the control since you are already using the clrForm directive on your form.

Custom date format: We use the locale from Angular to determine the format. This is not currently overridable beyond that.

Disallow date ranges: This is not currently supported, but issue is https://github.com/vmware/clarity/issues/3009.

Jeremy Wilken
  • 6,965
  • 22
  • 21