# Custom date format for DatePickerWidgetAnnotation

**URL:** <https://pdfjs.community/t/custom-date-format-for-datepickerwidgetannotation/587>\
**Category:** Technical Support\
**Created:** [March 9, 2021, 5:14am UTC](https://pdfjs.community/t/custom-date-format-for-datepickerwidgetannotation/587 "2021-03-09T05:14:18Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![fuse](https://avatars.discourse-cdn.com/v4/letter/f/8e8cbc/32.png) [@fuse](https://pdfjs.community/u/fuse)\
**Post date:** [March 9, 2021, 10:41pm UTC](https://pdfjs.community/t/custom-date-format-for-datepickerwidgetannotation/587/3 "2021-03-09T22:41:59Z")

</div>

Hi,

I am creating them programmatically, roughly like this:

```javascript
const field = new Annotations.Forms.Field(fieldItem.Id, {
    value: fieldItem.Value // some value
});
const annot = new Annotations.DatePickerWidgetAnnotation(field);

// ... apply page/width/height/x/y here ...

 annotManager.addAnnotation(annot);
 annotManager.redrawAnnotation(annot);

```

Cheers, Luke.

---

_[View the full topic](https://pdfjs.community/t/custom-date-format-for-datepickerwidgetannotation/587)._
