CMartins
CMartins

Reputation: 3293

Telerik Grid with rage date filter but just one DatePicker

I have this Telerik RadGrid with a date column filter, I'm not happy with the rage filter using 2 calendar datepickers, {edit} to much with or height for that column I have no intentions of validate or restrict dates. {end edit}. Is there a way of solving this with 1 calendar but still using Telerik controls?

enter image description here

Upvotes: 1

Views: 491

Answers (2)

Drag and Drop
Drag and Drop

Reputation: 2734

The Best way to pick two date (From/To) is to have 2 DatePickers. There is no logical work around to this, and it's "KISS" .
If you have one DatePickers.

That first fire select event get date "from" and second get date "to".

How can this be user friendly ?
If you enter 1rst date.
Then want to modify the 1rst date Without setting the 2nd date. How will you do ?

The real question is why dont you want 2 Date picker ?
- Is it because it to big to display it nicely in the FilterBar?
- If it's a User need, try to improve the logic behind the DatePiker.
Perhaps the Date is not random ? And can be done with a RadSlider?
Or they select a date and get for range -3 / +3 range.

There is no simple solution, because what you need and what you want are not clear.

edit: If you need to have 2 input text with only one single calendar icon, You will end with the same problem how do they chose witch input they wanna set the value in?

I hope this will help,

Regards,
Pierre

Upvotes: 1

M. Wiśnicki
M. Wiśnicki

Reputation: 6203

The best way for use only one date picker control is create own logic for this filter using one datapicker and something for display your range filter (label).

First fire select event get date "from" and second get date "to".

Upvotes: 1

Related Questions