---
title: "Changing the format of the search widget&#8217;s date picker"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityview/search/changing-the-format-of-the-search-widgets-date-picker/"
---

By default, GravityView formats dates in the US format of `mm/dd/yyyy` . If you would like to change that, you can.

### Date format options are:

- `dmy` - dd/mm/yyyy
- `dmy_dash` - dd-mm-yyyy
- `dmy_dot` - dd.mm.yyyy
- `mdy` - mm/dd/yyyy *(default)*
- `ymd_slash` - yyyy/mm/dd
- `ymd_dash` - yyyy-mm-dd
- `ymd_dot` - yyyy.mm.dd

To modify the format, use the `gravityview/widgets/search/datepicker/format` filter below:

```
function modify_gravityview_search_datepicker_format( $format ) {
    return 'mdy'; // 
```

```
function modify_gravityview_search_datepicker_format( $format ) {
    return 'mdy'; // 
}
add_filter( 'gravityview/widgets/search/datepicker/format', 'modify_gravityview_search_datepicker_format'  );
```

Read here how to add these code samples to your website: [Where to put code samples.](https://www.gravitykit.com/docs/gravityview/customizing-your-views/where-to-put-code-samples/)