Git Product home page Git Product logo

Comments (5)

fingerpich avatar fingerpich commented on May 31, 2024

Hi
could you please reproduce it in plunker?
I think you make the moment object in a wrong way you should use the following way

moment('miladi date')
moment('shamsi date', 'jYYYY/jMM/jDD')

or

moment.locale('fa');
moment('shamsi date');

demo in plunker

from jalali-moment.

javidsapand avatar javidsapand commented on May 31, 2024

Here is the Stackblitz demo

from jalali-moment.

fingerpich avatar fingerpich commented on May 31, 2024

try this

    this.testForm = this.formBuilder.group({
      date: [moment().format('YYYY-MM-DD')],
    });

as you see in this component document input should be moment object or format as iso 8601 Notation.

from jalali-moment.

peymanebrahimi avatar peymanebrahimi commented on May 31, 2024
const d1: string = moment('1396-12-12', 'jYYYY-jMM-jDD').format('YYYY-MM-DD');
const d2: string = '2018-03-03';
this.testForm = this.formBuilder.group({
  date: [d1],
  date2: [d2]
});

https://stackblitz.com/edit/angular-chkdvt?file=app/app.component.ts

from jalali-moment.

javidsapand avatar javidsapand commented on May 31, 2024

Thanks a lot both of you guys @fingerpich and @peymanebrahimi

from jalali-moment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.