Hi
We need to customize the Recurrence control present within Schedule control. I need to use recurrence control standalone only.
Our requirement is,
- Hide the dropdown for Until, Never and End values.
- Add a date picker control which allows user to select Start Date.
I was able to do it but its more of JQuery way as specified in the code base attached.
To hide the drop down - I am extracting the Div element using the class "e-end-on". Then making that div invisible.
ngAfterViewChecked() {
const elements = this.elem.nativeElement.querySelectorAll('.e-end-on');
elements.forEach(e => {
e.style.display = 'none';
});
}
To add the datepicker control - I am adding it manually using HTMLElement and DatePicker control.
const inputEle: HTMLInputElement = createElement('input', {
className: 'e-field', attrs: { name: 'Value' }
}) as HTMLInputElement;
container.appendChild(inputEle);
const datePicker: DatePicker = new DatePicker({
htmlAttributes: { name: 'Start Date', placeholder: 'Starts From' },
enabled: true,
allowEdit : true,
isMultiSelection: false,
format: 'dd/MM/yyyy',
placeholder: 'Starting Date',
showClearButton: false,
showTodayButton: true
});
datePicker.appendTo(inputEle);
inputEle.setAttribute('Date', 'EventType');
container.appendChild(inputEle);
I am interested to find is there is an angular way to do the same?
Also with above method when I am adding the datepicker, I am not able to bind value to it. How can I do the same?
Thanks
Anup
Attachment:
app_7e1a7754.zip