1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

date persian in angular

Discussão em 'Angular' iniciado por mohsen sarvari, Julho 8, 2025.

  1. {{ l('BirthDate') }}
    <ng-persian-datepicker (dateOnSelect)="onShamsiDateChange($event)"
    [calendarIsGregorian]="false"
    [dateValue]="birthDateShamsi"
    [dateInitValue]="null">
    <input id="Employee_birthDate"
    class="form-control"
    type="text"
    name="birthDate"
    [formControl]="birthDateControl"
    />
    </ng-persian-datepicker>

    <validation-messages [formCtrl]="birthDateControl"></validation-messages>
    </div>


    onShamsiDateChange(shamsiDate: any): void { if (!shamsiDate || !shamsiDate.shamsi || !shamsiDate.timestamp) return;

    this.birthDateShamsi = shamsiDate.shamsi;
    this.birthDateControl.setValue(shamsiDate.shamsi);

    // تبدیل دقیق به DateTime
    this.employee.birthDate = DateTime.fromMillis(shamsiDate.timestamp);

    console.log('BirthDate to send: ', this.employee.birthDate.toISO());


    } set default date but i do not defalut date?

    not set defalt . not sen to server

    Continue reading...

Compartilhe esta Página