Base solution for your next web application

Activities of "blueoceandev"

last comment (sorry grinding on this for a while)..

I have a fix if you don't care about time

place these two lines around line 152 in AppPreBootstrap.ts

(moment as any).fn.toString = function() { return this.format("L"); };
(window as any).moment.fn.toString = function() { return this.format("L"); };

this will universally change how moment's .toString() function works..

I don't have a better long term idea of how to handle this, but then again, I am just a user so.... ;-)

And ngx-bootstrap just closed the issue as by design. :-(

I did a bunch of digging... Definetly something up between Moment and ngx-bootstrap.. I have submitted a ticket.. But if this worked before, perhaps we should pin package.json to a known good ngx-bootstrap?

here is the issue report on github https://github.com/valor-software/ngx-bootstrap/issues/4826

The issue is here in configFromStringAndFormat() in ngx-bootstrap-chronos.js

I am not sure that the issue is actually in ngx-bootstrap, but here is where it presents itself.

ngx-bootstrap assumes the string coming out of calling .toString() on the date (which is a moment object) will be MM/DD/YYYY but its actually much different... The result is the parsing is completely off the rails and it returns a wacky date.

I don't know if there is configuration happening in ASPNetZero somewhere telling Moment to default to the long format it is using here or if there is configuration somewhere to tell ngx-bootstrap to use MM/DD/YYYY format on this string..

I have the same issue ASPNetzero: 6.3.1 Angular: ^7.0.3 ngx-bootstrap: ^3.1.1

I can confirm that the data being saved when I first save the form is sent correctly, and the date that comes back (it comes back and is convereted into a moment by something in the framework) is the correct value as well..

But I just set the date to 11/2/2018, and it is displaying as 03/20/2018... I have also seen it display as 01/20/2018

Josh

Answer

that worked for me.. Thanks..

Answer

I checked the download area and my project only shows the 5.6.2 download, there is no option to upgrade..

what is the process to upgrade a current project to a new version?

Wow, what a find! That fixed it for me... Thanks!.

Here is a build log if this is useful.. There are a couple of assembly conflicts that things are building despite of, I am not sure I am used to seeing those on most of my other work so maybe they are related? anyway... Let me know what else might be worth looking into.

1>------ Build started: Project: Syngin.RTS.Application.Client, Configuration: Debug Any CPU ------ 1>C:\repos\Syngin\RTS\aspnet-core\src\Syngin.RTS.Application.Client\Syngin.RTS.Application.Client.csproj : warning NU1701: Package 'modernhttpclient 2.4.2' was restored using '.NETPortable,Version=v0.0,Profile=Profile259, .NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. 1>Syngin.RTS.Application.Client -> C:\repos\Syngin\RTS\aspnet-core\src\Syngin.RTS.Application.Client\bin\Debug\netstandard2.0\Syngin.RTS.Application.Client.dll 1>Done building project "Syngin.RTS.Application.Client.csproj". 2>------ Build started: Project: Syngin.RTS.Mobile.Shared, Configuration: Debug Any CPU ------ 2>C:\repos\Syngin\RTS\aspnet-core\src\Syngin.RTS.Mobile.Shared\Syngin.RTS.Mobile.Shared.csproj : warning NU1701: Package 'Microsoft.Bcl 1.1.6' was restored using '.NETPortable,Version=v0.0,Profile=Profile259, .NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. 2>C:\repos\Syngin\RTS\aspnet-core\src\Syngin.RTS.Mobile.Shared\Syngin.RTS.Mobile.Shared.csproj : warning NU1701: Package 'Microsoft.Bcl.Async 1.0.165' was restored using '.NETPortable,Version=v0.0,Profile=Profile259, .NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. 2>C:\repos\Syngin\RTS\aspnet-core\src\Syngin.RTS.Mobile.Shared\Syngin.RTS.Mobile.Shared.csproj : warning NU1701: Package 'modernhttpclient 2.4.2' was restored using '.NETPortable,Version=v0.0,Profile=Profile259, .NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. 2>C:\repos\Syngin\RTS\aspnet-core\src\Syngin.RTS.Mobile.Shared\Syngin.RTS.Mobile.Shared.csproj : warning NU1701: Package 'PCLStorage 1.0.2' was restored using '.NETPortable,Version=v0.0,Profile=Profile259, .NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. 2>C:\repos\Syngin\RTS\aspnet-core\src\Syngin.RTS.Mobile.Shared\Syngin.RTS.Mobile.Shared.csproj : warning NU1701: Package 'Xam.FormsPlugin.Iconize 1.0.10' was restored using '.NETPortable,Version=v0.0,Profile=Profile259, .NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. 2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "ImageCircle.Forms.Plugin.Abstractions". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 2>Controls\HideableToolbarItem.cs(10,60,10,172): warning CS0618: 'BindableProperty.Create<TDeclarer, TPropertyType>(Expression<Func<TDeclarer, TPropertyType>>, TPropertyType, BindingMode, BindableProperty.ValidateValueDelegate<TPropertyType>, BindableProperty.BindingPropertyChangedDelegate<TPropertyType>, BindableProperty.BindingPropertyChangingDelegate<TPropertyType>, BindableProperty.CoerceValueDelegate<TPropertyType>, BindableProperty.CreateDefaultValueDelegate<TDeclarer, TPropertyType>)' is obsolete: 'Create<> (generic) is obsolete as of version 2.1.0 and is no longer supported.' 2>Controls\CardView.cs(14,17,14,29): warning CS0618: 'Frame.OutlineColor' is obsolete: 'OutlineColor is obsolete as of version 3.0.0. Please use BorderColor instead.' 2>Syngin.RTS.Mobile.Shared -> C:\repos\Syngin\RTS\aspnet-core\src\Syngin.RTS.Mobile.Shared\bin\Debug\netstandard2.0\Syngin.RTS.Mobile.Shared.dll 2>Done building project "Syngin.RTS.Mobile.Shared.csproj". 3>------ Build started: Project: Syngin.RTS.Mobile.Droid, Configuration: Debug Any CPU ------ 3>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2110,5): warning MSB3277: Found conflicts between different versions of "Microsoft.CSharp" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed. 3>C:\repos\Syngin\RTS\aspnet-core\src\Syngin.RTS.Mobile.Droid\Renderer\CropViewRenderer.cs(12,5,128,6): warning CS0618: 'PageRenderer.PageRenderer()' is obsolete: 'This constructor is obsolete as of version 2.5. Please use PageRenderer(Context) instead.' 3> Syngin.RTS.Mobile.Droid -> C:\repos\Syngin\RTS\aspnet-core\src\Syngin.RTS.Mobile.Droid\bin\Debug\Syngin.RTS.Xamarin.Android.dll 3> ** No way to resolve conflict between "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e". Choosing "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.**

4>Starting deployment to Samsung SM-G960U ... 4>Deploying to Samsung SM-G960U ... 4>Build started. 4>Project "Syngin.RTS.Mobile.Droid.csproj" (Install target(s)): 4>C:\Program Files\Java\jdk1.8.0_172\bin\keytool.exe -list -alias androiddebugkey -storepass android -keypass android -keystore "C:\Users\joshh\AppData\Local\Xamarin\Mono for Android\debug.keystore" 4>C:\Program Files (x86)\Android\android-sdk\build-tools\25.0.3\zipalign.exe 4 "C:\repos\Syngin\RTS\aspnet-core\src\Syngin.RTS.Mobile.Droid\obj\Debug\MonoAndroid90\android\bin\com.Syngin.RTS.Mobile.apk" "bin\Debug\com.Syngin.RTS.Mobile-Signed.apk" 4>C:\Program Files\Java\jdk1.8.0_172\bin\java.exe -jar "C:\Program Files (x86)\Android\android-sdk\build-tools\25.0.3\lib\apksigner.jar" sign --ks "C:\Users\joshh\AppData\Local\Xamarin\Mono for Android\debug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 15 --max-sdk-version 28 C:\repos\Syngin\RTS\aspnet-core\src\Syngin.RTS.Mobile.Droid\bin\Debug\com.Syngin.RTS.Mobile-Signed.apk 4>Done building project "Syngin.RTS.Mobile.Droid.csproj". 4>Build succeeded. 4>Deployment was successful to Samsung SM-G960U. ========== Build: 3 succeeded, 0 failed, 2 up-to-date, 0 skipped ========== ========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========

Info sent.. Thanks

Josh

Showing 1 to 10 of 14 entries