views:

37

answers:

1

Is it possible to set the value of a daterangepicker field programmatically? How can this be accomplished?

+1  A: 

It's just a text input, so yes, you can set it.

On Filament's example page, you could do the following:

$('input').val('08/10/2010');

Additionally, an excerpt from Filament group's date range picker page:

Driven by Input Value

The datepickers will be generated based on any values that are in the inputs at page load. For single inputs, it will split the input value by the rangeSplitter character (default: '-'). Each value is parsed by date.js, so you could even begin with a range like "today - next week" in the input, and the datepickers will be set accordingly.

Nate Pinchot
absolutely perfect. Thank you.
Jimmy