Base solution for your next web application
Open Closed

Getting diffrent today date in mozilla firefox? #10993


User avatar
0
shedspotter created

Prerequisites

  • What is your product version? 11.0.0
  • What is your product type ? Angular
  • What is product framework type ? .net core

I we are getting diffrent today date in google chrom & mozilla firefox.

<div class="p-5">
    {{today}}
</div>
@Component({
    selector: 'app-demo',
    templateUrl: './demo.component.html',
    styleUrls: ['./demo.component.css'],
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class DemoComponent  {
    public dateFormat: string;
    public today = new Date();
  }


6 Answer(s)
  • User Avatar
    0
    musa.demir created

    Hi @shedspotter

    It is very strange problem. First of all it does not seems like it is related AspNet Zero. And i dont know if it is even possible. Here is my check.

    It works as expected. Please share a clean project with us that contains that problem so that we can reproduce the problem.

  • User Avatar
    0
    shedspotter created

    Sorry, but i already confirmed in smiple angular demo app, & it's working as expected. But, not in asp.net zero solution.

    I also observed AppPreBootstrap.ts file have native date modification by luxon package.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @shedspotter

    Do you get the same values if you remove those date modifications ?

    Thanks,

  • User Avatar
    0
    shedspotter created

    yes

  • User Avatar
    0
    shedspotter created

    Please, dont try to repreduce in dev tool. try in angular html template. Like i shared above sample example.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thanks, please follow https://github.com/aspnetzero/aspnet-zero-core/issues/3938 for the official fix. We will work on this issue in a short time.