angular-datepicker icon indicating copy to clipboard operation
angular-datepicker copied to clipboard

Option to max selections

Open vlio20 opened this issue 7 years ago • 7 comments

In multi select mode it would be great to have maximum selections. When selecting more than the allowed number the first selection will be unselected

vlio20 avatar Dec 14 '17 09:12 vlio20

I'll take it.

Does new config maxSelections for day picker and month picker sounds good?

I think that the best behaviour is when choosing max selections to disable more selections until removing a selection.

justtal avatar Jan 13 '18 06:01 justtal

the naming is ok. Regarding the behaviour, in my opinion there are 2 options:

  1. (as described by you) disable more selections until removing a selection
  2. Unselect the oldest when max exceeded.

I prefer the second, lets start with it? we later can add configuration to achieve the first. WDYT?

vlio20 avatar Jan 13 '18 18:01 vlio20

Hi , I couldnot able to sepeerate the multi select by comma(',').It is still showing ('|').how to implement that.

config: IDatePickerConfig = {

allowMultiSelect: true,
closeOnSelect: undefined,
closeOnSelectDelay: 100,
openOnFocus: true,
openOnClick: true,
onOpenDelay: 0,
weekDayFormat: 'ddd',

// appendTo: document.body, showNearMonthDays: true, showWeekNumbers: false, inputElementContainer:undefined, appendTo:undefined, returnedValueType:ECalendarValue.String };

placeholder="Select date"> </dp-date-picker> </div>

avineet1993 avatar Apr 29 '18 14:04 avineet1993

@avineet1993 , the separator is set to be '|'. There is no way (currently to change it).

vlio20 avatar Apr 30 '18 04:04 vlio20

@justtal I am still waiting :)

vlio20 avatar Nov 20 '20 19:11 vlio20

Sorry, I'm Reacting already 🤣 😘

justtal avatar Nov 20 '20 19:11 justtal

@justtal this is a step in the wrong direction :)

vlio20 avatar Nov 20 '20 19:11 vlio20