Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Material Design / Collapse Label / Metronic #2643


User avatar
0
bilalhaidar created

Hi,

I am using the daterangepicker as a single value not range.

I am seeing weird behaviour when form loads first time (as shown in the attachment). If later I select a date, it works fine.

<div class="form-group form-md-line-input form-md-floating-label no-hint">
                            <input date-range-picker type="text" options="vm.dateRangeOptions" min="vm.dateRangeOptions.min" max="vm.dateRangeOptions.max" class="form-control date-picker" ng-model="vm.dob" />
                            <label>Date of Birth</label>
                        </div>


3 Answer(s)
  • User Avatar
    0
    hozkar created

    Hi!

    You should apply "edited" class when your ng-model has data:

    <input date-range-picker type="text" options="vm.dateRangeOptions" min="vm.dateRangeOptions.min" max="vm.dateRangeOptions.max" class="form-control date-picker" ng-model="vm.dob" ng-class= "{ 'edited': vm.dob }"/>
    
  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks @Hozkar :).

  • User Avatar
    0
    bilalhaidar created

    Thanks guys!

    Regards Bilal