akveo / nebular

:boom: Customizable Angular UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/nebular
MIT License
8.06k stars 1.51k forks source link

RangePicker with format is not working #2709

Open ShaharIlany opened 3 years ago

ShaharIlany commented 3 years ago

Issue type

I'm submitting a ... (check one with "x")

Issue description

Current behavior:

When i set a format to rangepicker and pick a range nothing shows in the input

Expected behavior:

the dates need to show up

Steps to reproduce:

<input nbInput [nbDatepicker]="datepicker"> <nb-rangepicker #datepicker format="dd\MM\yyyy">

Related code:

<input nbInput [nbDatepicker]="datepicker">
                        <nb-rangepicker #datepicker format="dd\MM\yyyy"></nb-rangepicker>

Other information:

npm, node, OS, Browser


node -v
v12.18.3

npm -v  
6.14.6

OS: Windows 10
Browser: Chrome

Angular, Nebular

"dependencies": {
    "@angular/animations": "~11.2.7",
    "@angular/cdk": "^10.2.1",
    "@angular/common": "~11.2.7",
    "@angular/compiler": "~11.2.7",
    "@angular/core": "~11.2.7",
    "@angular/forms": "~11.2.7",
    "@angular/platform-browser": "~11.2.7",
    "@angular/platform-browser-dynamic": "~11.2.7",
    "@angular/router": "~11.2.7",
    "@angular/service-worker": "^11.2.7",
    "@fortawesome/fontawesome-svg-core": "^1.2.28",
    "@fortawesome/free-brands-svg-icons": "^5.13.0",
    "@fortawesome/free-regular-svg-icons": "^5.13.0",
    "@nebular/eva-icons": "6.2.1",
    "@nebular/theme": "^6.2.1",
    "@ngx-translate/core": "^13.0.0",
    "@ngx-translate/http-loader": "^6.0.0",
    "angular2-signaturepad": "^2.11.0",
    "bootstrap": "^4.5.3",
    "echarts": "^5.0.2",
    "eva-icons": "^1.1.3",
    "file-saver": "^2.0.5",
    "http-server": "^0.12.3",
    "jquery": "^3.5.1",
    "keen-slider": "^5.3.4",
    "ng-recaptcha": "^6.1.0",
    "ngx-echarts": "^6.0.1",
    "ngx-pinch-zoom": "^2.5.4",
    "ngx-typed-js": "^2.0.2",
    "ngx-webcam": "^0.3.2",
    "pdf-lib": "^1.12.0",
    "pdfjs-dist": "^2.5.207",
    "popper.js": "^1.16.1",
    "pwacompat": "^2.0.17",
    "resize-observer-polyfill": "^1.5.1",
    "rxjs": "~6.6.0",
    "signature_pad": "^2.3.2",
    "tslib": "^2.0.0",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1102.6",
    "@angular/cli": "~11.2.6",
    "@angular/compiler-cli": "~11.2.7",
    "@schematics/angular": "~10.2.0",
    "@types/jasmine": "~3.6.0",
    "@types/jasminewd2": "~2.0.3",
    "@types/jquery": "^3.5.4",
    "@types/node": "^12.20.5",
    "@types/pdfjs-dist": "^2.1.7",
    "codelyzer": "^6.0.0",
    "jasmine-core": "~3.6.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~6.3.2",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "tslint": "~6.1.0",
    "typescript": "~4.0.2"
  }
andreipadolin commented 3 years ago

Hi @ShaharIlany could you please look at our docs: https://akveo.github.io/nebular/docs/components/datepicker/overview#nbdatepickerdirective

Try suggestions from article about formatting: "Formatting Issue" By default, datepicker uses angulars LOCALE_ID token for localization ...

Please respond if it works for you.