ng-bs-daterangepicker icon indicating copy to clipboard operation
ng-bs-daterangepicker copied to clipboard

How to set field to be empty by default?

Open jeserkin opened this issue 10 years ago • 6 comments

Need field with range to be empty at first. Later on, when one selects something, then dates could appear. Is it possible?

jeserkin avatar Nov 07 '14 07:11 jeserkin

I have the same issue with #jeserkin. I have a form with a daterange picker to be empty at first and validate it when i submit my form. Would you please to support this function?

thanhtung1509 avatar Jan 17 '15 17:01 thanhtung1509

I don't like to publish my stuff in someone else repo, but seems there hasn't been much progres lately. So I've gathered diff. solutions for daterange picker and tried to create one with all the best features from others + plus something from me. Enough said: https://github.com/jeserkin/nDaterangepicker

jeserkin avatar Jan 18 '15 17:01 jeserkin

@jeserkin Please submit any pull request you want. I am one of the new maintainers of this repo and I will accept the PR if it makes sense.

alanjames1987 avatar Jul 23 '15 17:07 alanjames1987

@alanjames1987 it still have bug,ng-model with range is abnormal at first. it set ng-mode first time and return .the range present nothing,but ng-model has value .

HaroldZhang91 avatar Aug 20 '15 02:08 HaroldZhang91

Hi is this issue resolved??... I have implemented this directive in my project and I'm using this to filter search results not being able to intialize to null is giving me problems

amer4 avatar Sep 21 '15 05:09 amer4

@amer4 remark the following code will fix the bug if (!$scope[modelValue] || (!$scope[modelValue].startDate)) { //ngModel.$setViewValue({ // startDate: moment().startOf('day'), // endDate: moment().startOf('day') //}); return; }

HaroldZhang91 avatar Sep 22 '15 01:09 HaroldZhang91