IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Angular Discussion :

Input Datepicker : réagir au clavier


Sujet :

Angular

  1. #1
    Membre éprouvé Avatar de Zebulon777
    Homme Profil pro
    Informaticien
    Inscrit en
    Février 2005
    Messages
    1 327
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Informaticien

    Informations forums :
    Inscription : Février 2005
    Messages : 1 327
    Par défaut Input Datepicker : réagir au clavier
    Bonjour à tous

    Quand je clique à la souris sur "Sélectionner une date", le datepicker s'ouvre correctement.
    Mais après avoir positionné le curseur sur le text, quand j’appuie sur ENTREE ou ESPACE, il ne se produit rien du tout.
    Si j'ajoute type="button", alors là, ça fonctionne, mais alors le texte "Sélectionner une date" disparait.
    Je dois passer à côté de quelque chose de très gros, mais le nez dans le guidon, je ne trouve pas.
    Si une bonne âme à la solution ?
    Merci d'avance.

    Voici mon code :

    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    <div class="calendar" [formGroup]="applyFilterForm">
      <i [ngClass]="{
        'fa fa-caret-left fa-4 previous': true,
        'disabled': !currentLayer ? true : null
        }" (click)="previousDate()"></i>
      <input tabindex="0" formControlName="calendarControl" [ngClass]="{
          'daterangepicker': true,
          'disabled': !currentLayer ? true : null
        }" readonly="readonly" (bsValueChange)="onValueChange($event)" bsDaterangepicker [bsConfig]="bsConfig"
        placeholder="Sélectionner une date" [attr.disabled]="!currentLayer ? true : null" />
      <i [ngClass]="{
          'fa fa-caret-right fa-4 next': true,
          'disabled': !currentLayer ? true : null
          }" (click)="nextDate()"></i>
    </div>

    Code css : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    .daterangepicker {
      height: 30px;
      color: white;
      cursor: pointer;
      width: 180px;
      background-color: transparent;
      border-radius: 0%;
      /*font-size: 16px;*/
      font-size: 14px;
      border: none;
      padding: 0;
    }
     
    .calendar {
      margin-top: 0rem;
    }
     
    .next {
      margin-left: 0.5rem;
      margin-top: 0.3rem;
    }
     
    .previous {
      margin-right: 0.5rem;
      margin-top: 0.3rem;
    }
     
    i {
      cursor: pointer;
    }
     
    .daterangepicker {
      opacity: 1; /* Firefox */
      text-align: center;
    }
     
    /* Smartphones (portrait and landscape) */
     
    /* landscape */
    @media  only screen and (max-width : 900px) {
      /**
     * Margin for the calendar.
     */
      ::ng-deep body > bs-daterangepicker-container {
        /* left: -0.1rem !important; */
        left: -0.1rem !important;
        top: 16rem !important;
      }
     
      /**
       * Calendar.
       */
      ::ng-deep body > bs-daterangepicker-container > div {
        box-shadow: 0 0 5px 0 #aaa !important;
        margin-left: 2rem;
        margin-top: -1rem;
      }
    }
     
    /* portrait */
    @media  only screen and (max-width : 900px) and (min-width: 500px) {
      ::ng-deep body > bs-daterangepicker-container {
        left: 180px !important;
        top: 25px !important;
      }
    }
     
    .daterangepicker.disabled::placeholder {
      color: #6c757d;
    }
     
    .daterangepicker::placeholder {
      color: white;
    }
     
    .disabled {
      cursor: not-allowed;
    }

    Code typescript : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    import { FilterTrafficName } from 'src/app/shared/app/enums';
    import { FilterTrafficItem, FiltersLayerWithMode } from '@shared-app/model/filter-traffic.model';
    import { FiltersTrafficService } from '@shared-app/store/filters/traffic/filters-traffic.service';
    import { Component, OnInit, Input, ChangeDetectionStrategy, ChangeDetectorRef, OnChanges, SimpleChanges } from '@angular/core';
    import { UntypedFormGroup, AbstractControl } from '@angular/forms';
    import { BsDatepickerConfig, BsLocaleService } from 'ngx-bootstrap/datepicker';
     
    // The hour doesn't convert correctly. The system hour is conserved.
    // The date set by component does not change. This is the behavior wished.
    import { defineLocale } from 'ngx-bootstrap/chronos';
    import { frLocale } from 'ngx-bootstrap/locale';
    defineLocale('fr', frLocale);
    // Into the constructor : BsLocaleService..use('fr')
     
    /**
     * Calendar component.
     */
    @Component({
      selector: 'app-calendar',
      templateUrl: './calendar.component.html',
      styleUrls: ['./calendar.component.css'],
      changeDetection: ChangeDetectionStrategy.OnPush
    })
    export class CalendarComponent implements OnInit, OnChanges {
      /**
       * Configuration object for the calendar parameters.
       */
      bsConfig: Partial<BsDatepickerConfig> = { isAnimated: true, containerClass: 'theme-orange', rangeInputFormat: 'DD/MM/YYYY', adaptivePosition: true };
     
      /**
       * Ref. to the form.
       */
      @Input() applyFilterForm: UntypedFormGroup;
      /**
       * Reinit the calendar binding.
       */
      @Input() reinitCalendar: boolean;
      /**
       * The binding of the current layer.
       */
      private pCurrentLayer: FiltersLayerWithMode;
     
      /**
       * Ref. to the form control calendar.
       */
      calendarControl: AbstractControl;
     
     
      /**
       * Constructor.
       *
       * @param calendarManager the calendar service
       */
      constructor(
        private filtersService: FiltersTrafficService,
        private bsLocale: BsLocaleService,
        private cd: ChangeDetectorRef) {
        this.bsLocale.use('fr');
      }
     
      /**
       * On init comp.
       */
      ngOnInit() {
        this.calendarControl = this.f.calendarControl;
     
        if (this.filtersService.isDateDefinedIntoCurrentFilterLayer()) {
          const [startDate, endDate] = this.filtersService.getDateFromCurrentFilterLayer();
          this.calendarControl.setValue([startDate, endDate]);
        }
      }
     
      /**
       * On changes comp attributes.
       */
      ngOnChanges(changes: SimpleChanges): void {
        const needChanges = changes.reinitCalendar;
        if (needChanges && needChanges.previousValue !== needChanges.currentValue && needChanges.currentValue === true) {
          if (this.calendarControl) {
            this.calendarControl.setValue(null);
          }
        }
      }
     
      get currentLayer() {
        return this.pCurrentLayer;
      }
     
      @Input()
      set currentLayer(layer: FiltersLayerWithMode) {
        this.pCurrentLayer = layer;
        if (!this.filtersService.isDateDefinedIntoCurrentFilterLayer()) {
          return;
        }
        if (!layer) {
          if (this.calendarControl) {
            this.calendarControl.setValue(null);
          }
        } else {
          const [startDate, endDate] = this.filtersService.getDateFromCurrentFilterLayer();
          this.calendarControl.setValue([startDate, endDate]);
        }
        this.cd.detectChanges();
      }
     
      /**
       * Handler when the range date changes.
       *
       * @param value the new range date
       */
      onValueChange(value: Array<Date>) {
        if (!value || this.filtersService.isValueEqualsFromCurrent(value)) {
          return;
        }
     
        this.filtersService.addOrUpdateFilterDateToCurrentLayer(new FilterTrafficItem(0, FilterTrafficName.DATE, value, ''));
      }
     
      /**
       * Set the previous date.
       */
      previousDate() {
        const value: Array<Date> = [this.addDays(this.calendarControl.value[0], -1), this.addDays(this.calendarControl.value[1], -1)];
        this.calendarControl.setValue(value);
        this.filtersService.addOrUpdateFilterDateToCurrentLayer(new FilterTrafficItem(0, FilterTrafficName.DATE, value, ''));
      }
     
      /**
       * Set the next date.
       */
      nextDate() {
        const value: Array<Date> = [this.addDays(this.calendarControl.value[0], 1), this.addDays(this.calendarControl.value[1], 1)];
        this.calendarControl.setValue(value);
        this.filtersService.addOrUpdateFilterDateToCurrentLayer(new FilterTrafficItem(0, FilterTrafficName.DATE, value, ''));
      }
     
      /**
       * Returns an object reference of the controls of form.
       * Each control is accessibe by its name as key and the value returned as a FormControl.
       *
       * @returns an object of each control of form
       */
      get f(): { [key: string]: AbstractControl } {
        return this.applyFilterForm.controls;
      }
     
      /**
       * Add days to the given date.
       *
       * @param date the date
       * @param days the number of days
       * @return the new date
       */
      private addDays(date: Date, days: number) {
        const copy = new Date(+date);
        copy.setDate(date.getDate() + days);
        return copy;
      }
     
    }

  2. #2
    Membre actif
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    89
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2007
    Messages : 89

  3. #3
    Membre éprouvé Avatar de Zebulon777
    Homme Profil pro
    Informaticien
    Inscrit en
    Février 2005
    Messages
    1 327
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Informaticien

    Informations forums :
    Inscription : Février 2005
    Messages : 1 327
    Par défaut
    Merci pour ta réponse.

    Je vais essayer de m'inspirer de ce que tu as donné.

  4. #4
    Membre éprouvé Avatar de Zebulon777
    Homme Profil pro
    Informaticien
    Inscrit en
    Février 2005
    Messages
    1 327
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Informaticien

    Informations forums :
    Inscription : Février 2005
    Messages : 1 327
    Par défaut
    Re bonsoir.

    J'ai bien avancé et résolu le problème de départ, mais il m'en arrive un autre :

    Dans les exemples que tu m'as donné, les différents calendriers prennent bien le focus et acceptent le déplacement interne avec la touche tab et avec les flèches, mais pas sur les miens.
    (ce n'est pas moi qui les ai implémenté, je suis intégré à d'un gros projet et je prends une partie de la suite)

    Je passe à côté de quoi qui peux provoquer ce fonctionnement ?

  5. #5
    Membre éprouvé Avatar de Zebulon777
    Homme Profil pro
    Informaticien
    Inscrit en
    Février 2005
    Messages
    1 327
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Informaticien

    Informations forums :
    Inscription : Février 2005
    Messages : 1 327
    Par défaut
    Je relance le sujet car je n'arrive toujours pas à ce que le calendrier prenne le focus.

    Pour simplifier, je remet mon code :



    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    <form [formGroup]="applyFilterForm">
      <div class="container custo">
        <div class="row section0">
          <app-layer-filter [layers]="trafficLayers" [applyFilterForm]="applyFilterForm" [submitted]="submitted"
            [currentLayer]="currentLayer" (layerCancelled)="layerCancelled()"></app-layer-filter>
        </div>
        <div class="row section1">
          <div class="col text-center"
            [ngClass]="{ 'invalid-block': (f.calendarControl.errors || applyFilterForm.errors?.errorNbDaysBetweenDates) && submitted && !reinit }">
            <app-calendar [applyFilterForm]="applyFilterForm" [currentLayer]="currentLayer"
              [reinitCalendar]="reinitCalendar"></app-calendar>
            <div *ngIf="f.calendarControl.errors && submitted && !reinit" class="invalid-msg">
              <div *ngIf="f.calendarControl.errors.required">{{ errorMsgDateRequired }}</div>
            </div>
            <div *ngIf="applyFilterForm.errors?.errorNbDaysBetweenDates" class="invalid-msg">
              {{ errorMsgNbDaysBetweenDates }}
            </div>
          </div>
        </div>
        <!--
        <div class="row align-items-center section2">
          <div class="col">
            <app-full-traffic [applyFilterForm]="applyFilterForm" [currentLayer]="currentLayer"></app-full-traffic>
          </div>
        </div>
      -->
        <div class="row section3">
          <div class="col">
            <fieldset *ngIf="
              isFullTrafficWithFlightPlanChecked() || isFullTrafficWithoutFlightPlanChecked()
            " disabled>
              <app-select-filter></app-select-filter>
            </fieldset>
            <app-select-filter *ngIf="
              isNotFullTrafficWithFlightPlanChecked() && isNotFullTrafficWithoutFlightPlanChecked()
            " [currentLayer]="currentLayer"
            (reinitCalendarFunction)="reinitCalendarFunction($event)"
            ></app-select-filter>
          </div>
        </div>
        <div class="row section5">
          <div>
            <label>Critères actifs</label>
          </div>
          <div>
            <button tabindex="0" class="btn buttonAddFilters btn-orange-f" *ngIf="haveFilters()" (click)="checkDeleteFilters()" active>
                  <i class="fa fa-trash-o"></i>
            </button>
            <button tabindex="0" class="btn buttonAddFilters btn-orange-f" *ngIf="notHaveFilters()" title="Supprimer tous les filtres" disabled>
                <i class="fa fa-trash-o"></i>
              </button>
            <button tabindex="0" type="button" class="btn btn-success checkSubmit btn-orange-f" (click)="onSubmit()">
                  <i class="fa fa-check"></i>
          </button>
          </div>
          <div class="deleteFilterContainer" *ngIf="checkValidDeleteFilter === true">
            <div>
              <label>Supprimer les filtres ?</label>
              <div class="pull-right">
                <button tabindex="0" class="btn btn-orange-f" title="Annuler la suppression des filtres" (click)="cancelDeleteFilters()">
                    <i class="fa fa-remove"></i>
                  </button>
                <button tabindex="0" type="button" class="btn btn-success checkSubmit btn-orange-f" title="Valider la suppression des filtres"
                  (click)="removeAllFilters()">
                    <i class="fa fa-check"></i>
                </button>
              </div>
            </div>
          </div>
        </div>
        <div class="row section4"
          [ngClass]="{ 'invalid-block': (applyFilterForm.errors?.errorZeroFilter || applyFilterForm.errors?.errorTooMuchFilters) && submitted }">
          <app-list-filter [activesFilters]="activesFilters"></app-list-filter>
          <div *ngIf="applyFilterForm.errors?.errorTooMuchFilters && submitted" class="invalid-msg">
            {{ errorMsgTooMuchFilters }}
          </div>
          <div *ngIf="applyFilterForm.errors?.errorZeroFilter && submitted" class="invalid-msg">
            {{ errorMsgZeroFilter }}
          </div>
        </div>
      </div>
    </form>

    Code css : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    form {
      height: 100%;
    }
     
    .custo {
      height: 100%;
      display: flex;
      flex-direction: column;
    }
     
    i {
      cursor: pointer;
    }
     
    button {
      color: rgb(3, 42, 85);
      background-color: white;
      border: none;
      height: 2rem;
      padding-top: 0;
      padding-bottom: 0;
    }
     
    button:disabled {
      cursor: not-allowed;
    }
     
    button:hover {
      background-color: rgb(255, 162, 34, 0.8);
      color: white;
      border: none;
    }
     
    button:not(.checkSubmit){
      /* color: white; */
      color: rgb(3, 42, 85);
      /* background-color: rgb(3, 42, 85, 0.8); */
      background-color: white;
    }
     
    button:not(.checkSubmit):hover{
      /* color: white; */
      /* background-color: rgb(2, 48, 97); */
      /* background-color: rgb(255, 255, 255, 0.5); */
      background-color: rgb(255, 162, 34, 0.8);
      color: white;
      border: none;
    }
     
    .checkSubmit{
      margin-left: 5px;
      color: #fff;
      background-color: #28a745;
      border-color: #28a745;
    }
     
    .btn-orange-f:focus, .btn-orange-f:active {
      outline-color: orange;
      outline-style: solid;
      outline-width: 3px;
    }
     
     
    .section0 {
      display: flex;
      flex-direction: column;
      padding-bottom: 0.3rem;
      border-bottom: 0.5px solid rgb(3, 42, 85);
      margin-left: -0.5rem;
      margin-right: -0.5rem;
      margin-right: -0.5rem;
    }
     
    .section1 {
      height: 2.5rem;
      display: flex;
      flex-direction: column;
      text-align: center;
      justify-content: center;
      padding-bottom: 0.3rem;
      border-bottom: 0.5px solid rgb(3, 42, 85);
      margin-top: 0.2rem;
      margin-left: -0.5rem;
      margin-right: -0.5rem;
    }
     
    /*
    .section2 {
      height: 6rem;
      border-bottom: 0.5px solid rgb(3, 42, 85);
      margin-left: -0.5rem;
      margin-right: -0.5rem;
    }
    */
     
    .section3 {
      font-size: 16px;
      border-bottom: 0.5px solid rgb(3, 42, 85);
      display: flex;
      justify-content: flex-start;
      margin-left: -0.5rem;
      margin-right: -0.5rem;
      padding-bottom: 1rem;
      height: auto;
      /* max-height: 25rem; */
    }
     
    .section5 {
      font-size: 16px;
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      padding-right: 0.2rem;
      margin-top: 0.2rem;
      margin-left: -0.5rem;
      margin-right: -0.5rem;
    }
     
    .section4 {
      font-size: 16px;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      position: relative;
      /* height: 6rem; */
      height: auto;
      align-items: stretch;
      margin-top: 0.3rem;
      margin-bottom: 0.3rem;
      margin-left: -0.5rem;
      margin-right: -0.5rem;
      overflow-y: hidden;
      overflow-x: hidden;
      /* scrollbar-width: none; */
      scrollbar-color: rgb(34, 130, 255) transparent;
      scrollbar-width: thin;
    }
     
    .section4::-webkit-scrollbar {
      /* width: 0px; */
    }
     
    fieldset {
      pointer-events: none;
    }
     
    .invalid-block {
      border: 1px solid rgb(255, 162, 34);
    }
     
    .invalid-msg {
      color: rgb(255, 162, 34);
      font-size: 11px;
      font-style: italic;
      text-align: center;
    }
     
    ::ng-deep input.disabled {
      cursor: not-allowed !important;
      background-color: #56708C;
    }
     
    .deleteFilterContainer{
      padding-top: 5px;
      width:100%;
    }

    Le typescript du fichier :
    Code typescript : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    import { ChangeDetectorRef, Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';
    import { AbstractControl, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
    import { FilterTrafficName } from '@shared-app/enums';
    import { FiltersLayer, FiltersLayerWithMode, FilterTrafficItem } from '@shared-app/model/filter-traffic.model';
    import { FiltersTrafficService } from '@shared-app/store/filters/traffic/filters-traffic.service';
    import { Subscription } from 'rxjs';
     
    /**
     * Filter component.
     */
    @Component({
      selector: 'app-filter',
      templateUrl: './filter.component.html',
      styleUrls: ['./filter.component.css'],
    })
    export class FilterComponent implements OnInit, OnDestroy {
      /**
       * true if submit button has been clicked.
       */
      submitted = false;
     
      /**
       * Event emitter to submit the child form.
       */
      public submit = new EventEmitter();
     
      checkValidDeleteFilter = false;
     
      /**
       * Error message if the number of days between dates is more than one.
       */
      errorMsgNbDaysBetweenDates = "Vous ne devez entrer qu'une seule date";
     
      /**
       * Error message if the date is not fill.
       */
      errorMsgDateRequired = 'La date doit être renseignée';
     
      /**
       * Error message if the number of filters is upper.
       */
      errorMsgTooMuchFilters = 'Vous devez supprimer les autres critères pour "Afficher tout le trafic"';
     
      /**
       * Error message if the number of filter is equals to zero.
       */
      errorMsgZeroFilter = 'Vous devez avoir au moins un critère dans la liste';
     
      /**
       * Ref. to the form.
       */
      applyFilterForm = new UntypedFormGroup({});
     
      /**
       * Ref. of the filter service subscription.
       */
      private filterServiceSub: Subscription;
     
      /**
       * Ref. of the search submit button subscription.
       */
      private submitSub: Subscription;
      /**
       * The traffic layers.
       */
      trafficLayers: FiltersLayer[] = [];
      /**
       * The current active filters.
       */
      activesFilters: FilterTrafficItem[];
      /**
       * The current layer.
       */
      currentLayer: FiltersLayerWithMode;
      /**
       * Indicate if we need to reinit.
       */
      reinit = false;
     
      /**
       * Reinit calendar.
       */
      reinitCalendar = false;
     
      @Output() onSetCurrentLayer: EventEmitter<FiltersLayerWithMode> = new EventEmitter();
     
      /**
       * Constructor.
       *
       * @param filterService service use to manage filters
       * @param fb the form builder
       */
      constructor(public filtersService: FiltersTrafficService, private fb: UntypedFormBuilder, private cd: ChangeDetectorRef) {}
     
      /**
       * Acitvate the delete button for filters.
       */
      checkDeleteFilters() {
        this.checkValidDeleteFilter = true;
      }
     
      /**
       * Cancel the delete of filters.
       */
      cancelDeleteFilters() {
        this.checkValidDeleteFilter = false;
      }
     
      /**
       * On init comp.
       */
      ngOnInit() {
        this.applyFilterForm = this.fb.group(
          {
            layerControl: [null, Validators.required],
            calendarControl: [null], //calendarControl: [null, Validators.required],
            fullTrafficWithFlightPlanControl: [],
            fullTrafficWithoutFlightPlanControl: [],
          },
          /*
          {
            validator: fullTrafficCheckedValidator(this.filtersService),
          },*/
        );
     
        this.filtersService.filtersLayers$.subscribe(layers => {
          console.log('SUBSCRIBE OF FILTERS LAYERS INTO FILTERS COMP');
          if (!layers) {
            return;
          }
          this.trafficLayers = layers;
          this.cd.detectChanges();
        });
     
        this.filterServiceSub = this.filtersService.currentLayer$.subscribe(current => {
          this.currentLayer = current;
          if (!current) {
            return;
          }
          /*
          if (current.filtersLayer.getListOfFilters().length === 0 && this.f.fullTrafficWithFlightPlanControl.value === true) {
            this.applyFilterForm.get('fullTrafficWithFlightPlanControl').setValue(false);
          }
          if (current.filtersLayer.getListOfFilters().length === 0 && this.f.fullTrafficWithoutFlightPlanControl.value === true) {
            this.applyFilterForm.get('fullTrafficWithFlightPlanControl').setValue(false);
          }*/
          /*
          if (current.mode === ModeTrafficLayer.UPDATE) {
            const fullTrafficWithFlightPlanFilter: boolean =
              current.filtersLayer.getListOfFilters().filter(f => f.key === FilterTrafficName.FULL_TRAFFIC_WITH_FLIGHT_PLAN).length > 0;
            if (fullTrafficWithFlightPlanFilter) {
              this.f.fullTrafficWithFlightPlanControl.setValue(true);
            }
          }
          if (current.mode === ModeTrafficLayer.UPDATE) {
            const fullTrafficWithoutFlightPlanFilter: boolean =
              current.filtersLayer.getListOfFilters().filter(f => f.key === FilterTrafficName.FULL_TRAFFIC_WITHOUT_FLIGHT_PLAN).length > 0;
            if (fullTrafficWithoutFlightPlanFilter) {
              this.f.fullTrafficWithoutFlightPlanControl.setValue(true);
            }
          } */
          this.calendarControlValidator(); // complete form builder
          this.applyFilterForm.updateValueAndValidity();
     
          this.activesFilters = current.filtersLayer.getListOfFilters().filter(f => f.key !== FilterTrafficName.DATE);
          this.cd.detectChanges();
        });
      }
     
      /**
       * On destroy comp.
       */
      ngOnDestroy(): void {
        if (this.filterServiceSub) {
          this.filterServiceSub.unsubscribe();
        }
      }
     
      /**
       * Handler when the validate button is clicked.
       */
      onSubmit() {
        this.submitted = true;
        this.reinit = false;
     
        if (this.applyFilterForm.invalid) {
          console.log('Errors=>', this.applyFilterForm.errors);
          return;
        }
        this.resetAndApplyFilters();
        this.submit.emit('');
      }
     
      /**
       * apply calendar validator requirement
       */
      private calendarControlValidator() {
        let isNumeroDeVolExist = this.filtersService.isNumeroDeVolExist();
        if (!isNumeroDeVolExist) {
          this.applyFilterForm.get('calendarControl').setValidators([Validators.required]);
        } else {
          this.applyFilterForm.get('calendarControl').clearValidators();
        }
        this.applyFilterForm.get('calendarControl').updateValueAndValidity();
      }
     
      /**
       * clean calendar input field
       * @param event 
       */
      reinitCalendarFunction(event){
        if(event){
          this.reinitCalendar = event;
        }
      }
     
      /**
       * Update the name of the current layer.
       */
      private updateNameCurrentLayer() {
        const newFiltersLayer: FiltersLayer = new FiltersLayer(
          this.currentLayer.filtersLayer.getId(),
          this.f.layerControl.value,
          this.currentLayer.filtersLayer.getListOfFilters(),
        );
        const newCurrentLayer: FiltersLayerWithMode = {
          filtersLayer: newFiltersLayer,
          mode: this.currentLayer.mode,
        };
        this.filtersService.updateCurrentLayer(newCurrentLayer);
      }
     
      /**
       * Reset and apply filters.
       */
      private resetAndApplyFilters() {
        const prevNameCurrentLayer = this.currentLayer.filtersLayer.getNameLayer();
        const prevIdCurrentLayer = this.currentLayer.filtersLayer.getId();
        if (this.f.layerControl.value !== prevIdCurrentLayer) {
          this.updateNameCurrentLayer();
        }
        this.reinit = true;
        this.activesFilters = [];
        //this.f.fullTrafficWithFlightPlanControl.setValue(false);
        //this.f.fullTrafficWithoutFlightPlanControl.setValue(false);
        this.filtersService.addOrUpdateLayer(prevIdCurrentLayer, prevNameCurrentLayer);
        this.filtersService.applyFiltersFromCurrentLayer();
        this.reinitCalendar = true;
      }
     
      /**
       * Handle the cancellation, reinit.
       */
      layerCancelled() {
        this.reinitCalendar = true;
        this.filtersService.resetCurrentLayer();
      }
     
      /**
       * Return true when the full trafic with flight plan is checked.
       *
       * @returns true when the full trafic is checked, otherwise false
       */
      isFullTrafficWithFlightPlanChecked(): boolean {
        return this.f.fullTrafficWithFlightPlanControl.value === true;
      }
      /**
       * Return true when the full trafic without flight plan is checked.
       *
       * @returns true when the full trafic without flight plan is checked, otherwise false
       */
      isFullTrafficWithoutFlightPlanChecked(): boolean {
        return this.f.fullTrafficWithoutFlightPlanControl.value === true;
      }
     
      /**
       * Return true when the full trafic with flight plan is unchecked.
       *
       * @returns true when the full trafic with flight plan is unchecked, otherwise false
       */
      isNotFullTrafficWithFlightPlanChecked(): boolean {
        return this.f.fullTrafficWithFlightPlanControl.value !== true;
      }
      /**
       * Return true when the full trafic without flight plan is unchecked.
       *
       * @returns true when the full trafic without flight plan is unchecked, otherwise false
       */
      isNotFullTrafficWithoutFlightPlanChecked(): boolean {
        return this.f.fullTrafficWithoutFlightPlanControl.value !== true;
      }
     
      /**
       * Return true if there is one filter at least.
       *
       * @returns true if there is one filter at least, otherwise false
       */
      haveFilters(): boolean {
        return this.filtersService.haveFilters();
      }
     
      /**
       * Return true if there is filter none.
       *
       * @returns true if there is filter none, otherwise false
       */
      notHaveFilters(): boolean {
        return this.filtersService.notHaveFilters();
      }
     
      /**
       * Remove all filters.
       */
      removeAllFilters() {
        this.filtersService.removeAllfiltersIntoCurrentLayer();
        this.checkValidDeleteFilter = false;
      }
     
      /**
       * Returns an object reference of the controls of form.
       * Each control is accessibe by its name as key and the value returned as a FormControl.
       *
       * @returns an object of each control of form
       */
      get f(): { [key: string]: AbstractControl } {
        return this.applyFilterForm.controls;
      }
    }

    Les modules :
    Code typescript : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    import { CommonModule } from '@angular/common';
    import { NgModule } from '@angular/core';
    import { FormsModule, ReactiveFormsModule } from '@angular/forms';
    import { FilterZoneFavoriteComponent } from '@feature/traffic/sidenav/tabs/tab-filter/search/filter/select-filter/filter-zone-favorite/filter-zone-favorite.component';
    import { AccordionModule } from 'ngx-bootstrap/accordion';
    import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
    import { TypeaheadModule } from 'ngx-bootstrap/typeahead';
    import { CalendarComponent } from './calendar/calendar.component';
    import { FilterComponent } from './filter.component';
    import { LayerFilterComponent } from './layer-filter/layer-filter.component';
    import { ListFilterComponent } from './list-filter/list-filter.component';
    import { FilterAircraftTypeComponent } from './select-filter/filter-aircraft-type/filter-aircraft-type.component';
    import { SearchAircTypeService } from './select-filter/filter-aircraft-type/search-airc-type-service';
    import { FilterAirportsComponent } from './select-filter/filter-airports/filter-airports.component';
    import { FilterFullTrafficComponent } from './select-filter/filter-full-traffic/filter-full-traffic.component';
    import { FilterNumeroDeVolComponent } from './select-filter/filter-numero-de-vol/filter-numero-de-vol.component';
    import { FilterPathComponent } from './select-filter/filter-path/filter-path.component';
    import { FilterTimeComponent } from './select-filter/filter-time/filter-time.component';
    import { SelectFilterComponent } from './select-filter/select-filter.component';
    import { AirportsService } from './select-filter/_shared/airports.service';
    import { PopupConfirmationComponent } from './select-filter/_shared/popup-confirmation/popup-confirmation.component';
     
    @NgModule({
      declarations: [
        //
        FilterAircraftTypeComponent,
        FilterAirportsComponent,
        FilterPathComponent,
        //FilterCallsignComponent,
        //FilterFlightNumberComponent,
        FilterTimeComponent,
        FilterZoneFavoriteComponent,
        FilterComponent,
        CalendarComponent,
        //FullTrafficComponent,
        SelectFilterComponent,
        ListFilterComponent,
        LayerFilterComponent,
        FilterNumeroDeVolComponent,
        FilterFullTrafficComponent,
        PopupConfirmationComponent,
      ],
      imports: [
        CommonModule,
        FormsModule,
        BsDatepickerModule.forRoot(),
        AccordionModule.forRoot(),
        TypeaheadModule.forRoot(),
        ReactiveFormsModule,
      ],
      providers: [AirportsService, SearchAircTypeService],
      exports: [FilterComponent],
    })
    export class FiltersModule {}

    Le CSS du calendrier :
    Code css : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    .daterangepicker {
      height: 30px;
      color: white;
      cursor: pointer;
      width: 180px;
      background-color: transparent;
      border-radius: 0%;
      /*font-size: 16px;*/
      font-size: 14px;
      border: none;
      padding: 0;
    }
     
    .calendar {
      margin-top: 0rem;
    }
     
    .next {
      margin-left: 0.5rem;
      margin-top: 0.3rem;
    }
     
    .previous {
      margin-right: 0.5rem;
      margin-top: 0.3rem;
    }
     
    .btn-orange:focus, .btn-orange:active {
      outline-color: orange;
      outline-style: solid;
      outline-width: 3px;
      box-shadow: none;
    }
     
    i {
      cursor: pointer;
    }
     
    .daterangepicker {
      opacity: 1; /* Firefox */
      text-align: center;
    }
     
    /* Smartphones (portrait and landscape) */
     
    /* landscape */
    @media  only screen and (max-width : 900px) {
      /**
     * Margin for the calendar.
     */
      ::ng-deep body > bs-daterangepicker-container {
        /* left: -0.1rem !important; */
        left: -0.1rem !important;
        top: 16rem !important;
      }
     
      /**
       * Calendar.
       */
      ::ng-deep body > bs-daterangepicker-container > div {
        box-shadow: 0 0 5px 0 #aaa !important;
        margin-left: 2rem;
        margin-top: -1rem;
      }
    }
     
    /* portrait */
    @media  only screen and (max-width : 900px) and (min-width: 500px) {
      ::ng-deep body > bs-daterangepicker-container {
        left: 180px !important;
        top: 25px !important;
      }
    }
     
    .daterangepicker.disabled::placeholder {
      color: #6c757d;
    }
     
    .daterangepicker::placeholder {
      color: white;
    }
     
    .disabled {
      cursor: not-allowed;
    }

    Le code HTML du calendrier :
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    <div class="calendar" [formGroup]="applyFilterForm">
      <i tabindex="0" [ngClass]="{
        'fa fa-caret-left fa-4 previous btn-orange': true,
        'disabled': !currentLayer ? true : null
        }" (click)="previousDate()" (keyup.space)="previousDate()"></i>
      <input class="btn-orange" id="ID_InputDatepicker" formControlName="calendarControl" [ngClass]="{
          'daterangepicker': true,
          'disabled': !currentLayer ? true : null
        }" readonly="readonly" (bsValueChange)="onValueChange($event)" (keyup.space)="AffDatepicker()" bsDaterangepicker [bsConfig]="bsConfig"
        placeholder="Sélectionner une date" [attr.disabled]="!currentLayer ? true : null" />
      <i tabindex="0" [ngClass]="{
          'fa fa-caret-right fa-4 next btn-orange': true,
          'disabled': !currentLayer ? true : null
          }" (click)="nextDate()" (keyup.space)="nextDate()"></i>
    </div>

    Le code Typescript du calendrier :
    Code typescript : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    import { FilterTrafficName } from 'src/app/shared/app/enums';
    import { FilterTrafficItem, FiltersLayerWithMode } from '@shared-app/model/filter-traffic.model';
    import { FiltersTrafficService } from '@shared-app/store/filters/traffic/filters-traffic.service';
    import { Component, OnInit, Input, ChangeDetectionStrategy, ChangeDetectorRef, OnChanges, SimpleChanges } from '@angular/core';
    import { UntypedFormGroup, AbstractControl } from '@angular/forms';
    import { BsDatepickerConfig, BsLocaleService } from 'ngx-bootstrap/datepicker';
     
    // The hour doesn't convert correctly. The system hour is conserved.
    // The date set by component does not change. This is the behavior wished.
    import { defineLocale } from 'ngx-bootstrap/chronos';
    import { frLocale } from 'ngx-bootstrap/locale';
    defineLocale('fr', frLocale);
    // Into the constructor : BsLocaleService..use('fr')
     
    /**
     * Calendar component.
     */
    @Component({
      selector: 'app-calendar',
      templateUrl: './calendar.component.html',
      styleUrls: ['./calendar.component.css'],
      changeDetection: ChangeDetectionStrategy.OnPush
    })
    export class CalendarComponent implements OnInit, OnChanges {
      /**
       * Configuration object for the calendar parameters.
       */
      bsConfig: Partial<BsDatepickerConfig> = { isAnimated: true, containerClass: 'theme-orange', rangeInputFormat: 'DD/MM/YYYY', adaptivePosition: true };
     
      /**
       * Ref. to the form.
       */
      @Input() applyFilterForm: UntypedFormGroup;
      /**
       * Reinit the calendar binding.
       */
      @Input() reinitCalendar: boolean;
      /**
       * The binding of the current layer.
       */
      private pCurrentLayer: FiltersLayerWithMode;
     
      /**
       * Ref. to the form control calendar.
       */
      calendarControl: AbstractControl;
     
     
      /**
       * Constructor.
       *
       * @param calendarManager the calendar service
       */
      constructor(
        private filtersService: FiltersTrafficService,
        private bsLocale: BsLocaleService,
        private cd: ChangeDetectorRef) {
        this.bsLocale.use('fr');
      }
     
      /**
       * On init comp.
       */
      ngOnInit() {
        this.calendarControl = this.f.calendarControl;
     
        if (this.filtersService.isDateDefinedIntoCurrentFilterLayer()) {
          const [startDate, endDate] = this.filtersService.getDateFromCurrentFilterLayer();
          this.calendarControl.setValue([startDate, endDate]);
        }
      }
     
      /**
       * On changes comp attributes.
       */
      ngOnChanges(changes: SimpleChanges): void {
        const needChanges = changes.reinitCalendar;
        if (needChanges && needChanges.previousValue !== needChanges.currentValue && needChanges.currentValue === true) {
          if (this.calendarControl) {
            this.calendarControl.setValue(null);
          }
        }
      }
     
      get currentLayer() {
        return this.pCurrentLayer;
      }
     
      @Input()
      set currentLayer(layer: FiltersLayerWithMode) {
        this.pCurrentLayer = layer;
        if (!this.filtersService.isDateDefinedIntoCurrentFilterLayer()) {
          return;
        }
        if (!layer) {
          if (this.calendarControl) {
            this.calendarControl.setValue(null);
          }
        } else {
          const [startDate, endDate] = this.filtersService.getDateFromCurrentFilterLayer();
          this.calendarControl.setValue([startDate, endDate]);
        }
        this.cd.detectChanges();
      }
     
      /**
       * Handler when the range date changes.
       *
       * @param value the new range date
       */
      onValueChange(value: Array<Date>) {
        if (!value || this.filtersService.isValueEqualsFromCurrent(value)) {
          return;
        }
     
        this.filtersService.addOrUpdateFilterDateToCurrentLayer(new FilterTrafficItem(0, FilterTrafficName.DATE, value, ''));
      }
     
      /**
       * Set the previous date.
       */
      previousDate() {
        const value: Array<Date> = [this.addDays(this.calendarControl.value[0], -1), this.addDays(this.calendarControl.value[1], -1)];
        this.calendarControl.setValue(value);
        this.filtersService.addOrUpdateFilterDateToCurrentLayer(new FilterTrafficItem(0, FilterTrafficName.DATE, value, ''));
      }
     
      /**
       * Set the next date.
       */
      nextDate() {
        const value: Array<Date> = [this.addDays(this.calendarControl.value[0], 1), this.addDays(this.calendarControl.value[1], 1)];
        this.calendarControl.setValue(value);
        this.filtersService.addOrUpdateFilterDateToCurrentLayer(new FilterTrafficItem(0, FilterTrafficName.DATE, value, ''));
      }
     
      /**
       * Returns an object reference of the controls of form.
       * Each control is accessibe by its name as key and the value returned as a FormControl.
       *
       * @returns an object of each control of form
       */
      get f(): { [key: string]: AbstractControl } {
        return this.applyFilterForm.controls;
      }
     
      /**
       * Add days to the given date.
       *
       * @param date the date
       * @param days the number of days
       * @return the new date
       */
      private addDays(date: Date, days: number) {
        const copy = new Date(+date);
        copy.setDate(date.getDate() + days);
        return copy;
      }
     
      /* Fonction qui permet d'afficher le calendrier en appuyant sur la barre d'espace  */
      AffDatepicker() {
        document.getElementById("ID_InputDatepicker").click();
    }
    }

    Voila, j'ai essayé de vous mettre le maximum de choses, afin que vous puissiez m'aider.

    Merci à ceux qui prendront le temps de me lire et surtout de m'aider.

  6. #6
    Membre actif
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    89
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2007
    Messages : 89
    Par défaut
    sur discord il ya un channel americain sur angular
    tu peux utiliser un traducteur pour communiquer

    reproduire sur stackblitz ton code et nous le montrer

  7. #7
    Membre éprouvé Avatar de Zebulon777
    Homme Profil pro
    Informaticien
    Inscrit en
    Février 2005
    Messages
    1 327
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Informaticien

    Informations forums :
    Inscription : Février 2005
    Messages : 1 327
    Par défaut
    Merci d'essayer de m'aider.

    Mais je ne vois pas comment mettre le code sur stackblitz car il me semble que ce serait beaucoup trop énorme avec Angular.

  8. #8
    Membre actif
    Profil pro
    Inscrit en
    Novembre 2007
    Messages
    89
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2007
    Messages : 89
    Par défaut
    tu peux poser la question ou mettre le code sous balise
    ```ts

    ```

  9. #9
    Membre éprouvé Avatar de Zebulon777
    Homme Profil pro
    Informaticien
    Inscrit en
    Février 2005
    Messages
    1 327
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 58
    Localisation : France, Essonne (Île de France)

    Informations professionnelles :
    Activité : Informaticien

    Informations forums :
    Inscription : Février 2005
    Messages : 1 327
    Par défaut
    Citation Envoyé par duke666 Voir le message
    tu peux poser la question ou mettre le code sous balise
    ```ts

    ```
    Certes, mais comme je te le disais, l'application est énorme, plusieurs 10zaines de modules, fichiers et autres images.

Discussions similaires

  1. Choix input datepicker lié à un liste déroulante
    Par mOscar007 dans le forum NodeJS
    Réponses: 0
    Dernier message: 27/10/2016, 18h22
  2. Réponses: 2
    Dernier message: 04/08/2010, 22h20
  3. Input clavier et UNICODE ?
    Par Clad3 dans le forum SDL
    Réponses: 9
    Dernier message: 09/01/2007, 17h43
  4. [JPanel] input clavier
    Par dedesite dans le forum AWT/Swing
    Réponses: 10
    Dernier message: 25/10/2006, 23h23
  5. [MFC] faire réagir des touches + et - du clavier
    Par pitit777 dans le forum MFC
    Réponses: 4
    Dernier message: 06/06/2005, 17h06

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo