<img src="abc.png" />
    
call to replace anchor tags contains '/admin' in href

Calendar widget

To add delivery date option on checkout, you can enable calendar option on the checkout.

  1. In the order options form, you can create a new field as Delivery Date.
  2. Select type as Widget.
  3. Click on the settings icon to edit the field, in the Widget column enter the name of the widget (say "Cal").
  4. Once the field is configured, go to Store widgets entity.
  5. Add new store widget, name it as "cal" (mentioned above), in the template add the below mentioned code:
    <div class="form-group" ng-init="dateOptions={changeYear:true,yearRange: '-50:+01',changeMonth: true,minDate:0,dateFormat:'dd/mm/yy'}; optionData[option.name].value=''">
    <div>
    <div ng-if="ms.cart.options.delievery_date">
    </div>
    <div ng-show="load_cal">
          Calendar Loading, Please Wait.  
    </div>
    <input type="text" min="{{today}}" ui-date="dateOptions" ng-change="getDateValue(optionData[option.name].value)" ng-model="optionData[option.name].value" class="form-control">​



  6. In the controller, add the below-mentioned code:
function ($rootScope, $scope , $timeout) {
    var formatDate = function (date) {
        var d = new Date(date),
            month = '' + (d.getMonth() + 1),
            day = '' + d.getDate(),
            year = d.getFullYear();
        if (month.length < 2) month = '0' + month;
        if (day.length < 2) day = '0' + day;
        return [year, month, day].join('-');
    }
    $rootScope.today = new Date();
    $rootScope.today = formatDate($rootScope.today);
    console.log('$rootScope.today===',$rootScope.today)

    $scope.load_cal = true;
    var get_status = function () {
        $timeout(function () {
            if ($scope.load_cal) {
                if ($('input').hasClass('hasDatepicker')) {
                    $scope.load_cal = false
                } else {
                    get_status();
                }
            }
        }, 100)
    }
    get_status();
}​

  • Enable the Active checkbox.
  • Select the theme to which this widget is to be applied.
  • Save the store widget.

2018-02-21T13:51:09.405Z