fetrarij / ngx-daterangepicker-material

Pure Angular 2+ date range picker with material design theme, a demo here:
https://fetrarij.github.io/ngx-daterangepicker-material/
MIT License
249 stars 252 forks source link

Vs 2.4.1 issue with use in Material and @angular/core.Renderer2 #346

Open edjm1971 opened 3 years ago

edjm1971 commented 3 years ago

Versions 2.4.1

Describe the bug A clear and concise description of what the bug is. There are a couple of things that are going on here with this package this is bug entry : 2

My other bug entry made use of the CSS style to correct the display. When attempting to use the Renderer2 in order to place the calendar the Daterangepicker outside click function always got triggered causing the calendar to close on the user for each and every click within the calendar if it was not directly on the numbers in the calendar.

On my calendar I have the timepicker enabled along with the HHMMSS and custom ranges

To Reproduce Steps to reproduce the behavior:

  1. Use the Renderer2 to position the calendar within your UI
  2. Click on '....' the calendar to open it
  3. Click on any area other than an actual number in the calendar
  4. The outside function of the Daterangpicker is triggered on the last if clause calling the .hide() function which hides the calendar

Expected behavior A clear and concise description of what you expected to happen. User would expect the calendar to remain open allowing them to select all of the settings for the date and time and not close until the user clicks on Cancel or the Apply button.

Suggest allowing for a configuration that would allow the override of the hide() calendar and allow for the external direct calling to hide the calendar as the Rendere2 usage causes undesired affects.

Screenshots If applicable, add screenshots to help explain your problem. The codebase of ours is on a sandbox system so I am not able to share the code.

Stackblitz link If applicable, add stackblitz link.

Additional context Add any other context about the problem here.