logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
charles25686713  
#1 Posted : Wednesday, November 23, 2022 2:08:50 PM(UTC)
charles25686713

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 7/1/2022(UTC)
Posts: 71

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Hi, using 9.0.7, I found this bug on date range fields on every view that has a date range controls (such as /Admin/Orders).

Manually type a date in start, such as 1/1/20
Manually type a date in end, such as 1/1/21
Before you finish typing the end date, the last digit of the start date will be removed, making it "1/1/2"
This applies if you use 4 digit years as well.

I suspect a bug in jQuery, or in the way the DatePicker is implemented in the javascript:

Original AC code in $(document).ready:

Code:
$('#data_5 .input-daterange').datepicker({
 keyboardNavigation: false,
 forceParse: false,
 autoclose: true
});


which then applies to these two controls:

Code:
<div class="input-daterange input-group" id="datepicker">
 <span class="input-group-addon">start</span>
 @Html.EditorFor(model => model.StartDate, new { @class = "input form-control" })                            
 <span class="input-group-addon">end</span>
 @Html.EditorFor(model => model.EndDate, new { @class = "input form-control" })                            
 </div>


I'm converting my custom code from AC gold, and I fixed this bug on my Views by changing the jQuery call:

Code:
$('#start').datepicker({
 keyboardNavigation: false,
 forceParse: false,
 autoclose: true
});

$('#end').datepicker({
 keyboardNavigation: false,
 forceParse: false,
 autoclose: true
});


(There's obviously more than one way to squash this bug.)

Thanks,
Charles

Edited by user Wednesday, November 23, 2022 2:10:18 PM(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

shaharyar  
#2 Posted : Friday, December 16, 2022 4:01:43 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 704

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Thanks for pointing this out.

I am going to report the issue.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.