popup calendar not visible

UI Components for Angular
Post Reply
jrssnyder
Posts: 2
Joined: 22 Jul 2016, 02:55

29 Mar 2019, 17:51

In a Visual Studio 2017 Angular 7 project, I am using PrimeNG version 6.1.7. I have a component with multiple child components, and some of those child components use the PrimeNG calendar. This was working without any problem at all as of 3/6/2019, at which time I delivered working code to a client.

However, if I pull that same code from my code repository and run the application now, clicking on the input elements only presents the grey overlay rendered by this element:

Code: Select all

<div class="ui-widget-overlay ui-datepicker-mask ui-datepicker-mask-scrollblocker" style="z-index: 1002;"></div>
When debugging in chrome, if I click on another application (even Chrome's DevTools window, un-docked from the primary window), then click back on the overlay, all of a sudden the date picker displays, and at the same time I see, in the Elements tab of the DevTools, the following html, right below the div referenced above:

Code: Select all

<div class="ng-trigger ng-trigger-overlayAnimation ng-tns-c23-2 ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-shadow ui-datepicker-touch-ui ng-star-inserted" ng-reflect-ng-class="[object Object]" style="z-index: 1004; transform: translate(-50%, -50%); opacity: 1;">

!-- TONS OF HTML FOR THE DATEPICKER -->

</div> 
As noted, I didn't change anything, so I'm guessing it is some change that was made by an update per settings in my package.json file.

I cannot for the life of me figure out what's going on. If I remove the "touchUI = true" attribute, then the calendar does appear, but it is not centered properly on the screen (this is a mobile-friendly application). Any help would be much appreciated.

A sample date control (all of them in the application have the same problem):

Code: Select all

<p-calendar [(ngModel)]="labor.laborServiceDate" [touchUI]="true"></p-calendar>
My package.json file:

Code: Select all

{
  "name": "vIDix.Pulse.Mobile.Web",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --extract-css --optimization=false",
    "build:ssr": "npm run build -- --app=ssr --output-hashing=media",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "7.1.3",
    "@angular/common": "7.1.3",
    "@angular/compiler": "7.1.3",
    "@angular/core": "7.1.3",
    "@angular/forms": "7.1.3",
    "@angular/http": "7.1.3",
    "@angular/platform-browser": "7.1.3",
    "@angular/platform-browser-dynamic": "7.1.3",
    "@angular/platform-server": "7.1.3",
    "@angular/router": "7.1.3",
    "@nguniversal/module-map-ngfactory-loader": "^5.0.0-beta.5",
    "angular-font-awesome": "^3.1.2",
    "angular2-signaturepad": "2.8.0",
    "angular2-cookie": "1.2.6",
    "aspnet-prerendering": "^3.0.1",
    "bootstrap": "^3.3.7",
    "core-js": "^2.4.1",
    "font-awesome": "^4.7.0",
    "ng2-validation": "4.2.0",
    "primeicons": "^1.0.0-beta.10",
    "primeng": "^6.1.3",
    "rxjs": "^6.3.3",
    "rxjs-tslint": "^0.1.6",
    "tslib": "^1.9.0",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.11.0",
    "@angular/cli": "^7.1.3",
    "@angular/compiler-cli": "7.1.3",
    "@angular/language-service": "7.1.3",
    "@types/jasmine": "~2.8.3",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "^4.0.1",
    "jasmine-core": "~2.8.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~2.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~4.1.0",
    "tslint": "~5.9.1",
    "typescript": "3.1.6"
  },
  "optionalDependencies": {
    "node-sass": "^4.9.0"
  }
}
My angular.json file:

Code: Select all

{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "newProjectRoot": "projects",
  "projects": {
    "vIDix.Pulse.Mobile.Web": {
      "root": "",
      "sourceRoot": "src",
      "projectType": "application",
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:browser",
          "options": {
            "outputPath": "dist",
            "index": "src/index.html",
            "main": "src/main.ts",
            "tsConfig": "src/tsconfig.app.json",
            "progress": true,
            "polyfills": "src/polyfills.ts",
            "assets": [
              "src/assets"
            ],
            "styles": [
              "node_modules/bootstrap/dist/css/bootstrap.min.css",
              "node_modules/primeicons/primeicons.css",
              "node_modules/primeng/resources/themes/nova-light/theme.css",
              "node_modules/primeng/resources/primeng.min.css",
              "node_modules/font-awesome/css/font-awesome.css",
              "src/styles.css"
            ],
            "scripts": []
          },
          "configurations": {
            "production": {
              "optimization": true,
              "outputHashing": "all",
              "sourceMap": false,
              "extractCss": true,
              "namedChunks": false,
              "aot": true,
              "extractLicenses": true,
              "vendorChunk": false,
              "buildOptimizer": true,
              "fileReplacements": [
                {
                  "replace": "src/environments/environment.ts",
                  "with": "src/environments/environment.prod.ts"
                }
              ]
            }
          }
        },
        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "browserTarget": "vIDix.Pulse.Mobile.Web:build"
          },
          "configurations": {
            "production": {
              "browserTarget": "vIDix.Pulse.Mobile.Web:build:production"
            }
          }
        },
        "extract-i18n": {
          "builder": "@angular-devkit/build-angular:extract-i18n",
          "options": {
            "browserTarget": "vIDix.Pulse.Mobile.Web:build"
          }
        },
        "test": {
          "builder": "@angular-devkit/build-angular:karma",
          "options": {
            "main": "src/test.ts",
            "karmaConfig": "./karma.conf.js",
            "polyfills": "src/polyfills.ts",
            "tsConfig": "src/tsconfig.spec.json",
            "scripts": [],
            "styles": [
              "src/styles.css",
              "node_modules/bootstrap/dist/css/bootstrap.min.css"
            ],
            "assets": [
              "src/assets"
            ]
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": [
              "src/tsconfig.app.json",
              "src/tsconfig.spec.json"
            ],
            "exclude": [
              "**/node_modules/**"
            ]
          }
        }
      }
    },
    "vIDix.Pulse.Mobile.Web-e2e": {
      "root": "e2e",
      "sourceRoot": "e2e",
      "projectType": "application",
      "architect": {
        "e2e": {
          "builder": "@angular-devkit/build-angular:protractor",
          "options": {
            "protractorConfig": "./protractor.conf.js",
            "devServerTarget": "vIDix.Pulse.Mobile.Web:serve"
          }
        },
        "lint": {
          "builder": "@angular-devkit/build-angular:tslint",
          "options": {
            "tsConfig": [
              "e2e/tsconfig.e2e.json"
            ],
            "exclude": [
              "**/node_modules/**"
            ]
          }
        }
      }
    }
  },
  "defaultProject": "vIDix.Pulse.Mobile.Web",
  "schematics": {
    "@schematics/angular:component": {
      "prefix": "app",
      "styleext": "css"
    },
    "@schematics/angular:directive": {
      "prefix": "app"
    }
  }
}

Samuel1234
Posts: 1
Joined: 11 Aug 2022, 14:21

08 Dec 2022, 17:19

DatePicker is preferable to Calendar, but PF 7.0 was buggy;slope unblocked I strongly advise upgrading to PF 8.0.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests