WeBid Bug Tracking

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000436WeBidAuctionspublic2013-06-14 00:252015-05-15 15:46
Reporterlinux4me 
Assigned Torenlok 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version1.1.0 
Target VersionFixed in Version1.2.0 
Summary0000436: Invalid Month Value Error on Setting Auction Date
DescriptionTo reproduce this error, you must have the Dates Format in Settings -> Time Settings set to "mm/dd/yyyy." Once you have that set, log in to the front end and click "Sell an Item" to create a new auction. Click the calendar icon next to Starting Date and choose a date greater than 12 for the desired start date. You'll get an error like:

Someone wrote

Invalid month value: '14'.

Allowed range is 01-12.


The source of the error is the date generating function on line 66 of js/calendar.php:

// date generating function

function f_tcalGenerDate (d_date) {

    return (

        (d_date.getDate() < 10 ? '0' : '') + d_date.getDate() + "-"

        + (d_date.getMonth() < 9 ? '0' : '') + (d_date.getMonth() + 1) + "-"

        + d_date.getFullYear()

    );

}




The fix is to check the "datesformat" setting and adjust the output of the date generating function accordingly by replacing the original date generating function with the following or something like it:

// date generating function

<?php

if ($system->SETTINGS['datesformat'] == 'USA')

{

    echo 'function f_tcalGenerDate (d_date) {

            return (

                (d_date.getMonth() < 9 ? \'0\' : \'\') + (d_date.getMonth() + 1) + "-"

                + (d_date.getDate() < 10 ? \'0\' : \'\') + d_date.getDate() + "-"

                + d_date.getFullYear()

            );

        }';

}

else

{

    echo 'function f_tcalGenerDate (d_date) {

            return (

                (d_date.getDate() < 10 ? \'0\' : \'\') + d_date.getDate() + "-"

                + (d_date.getMonth() < 9 ? \'0\' : \'\') + (d_date.getMonth() + 1) + "-"

                + d_date.getFullYear()

            );

        }';

}

?>
TagsNo tags attached.
import_id438
Thread
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2015-04-01 13:17 renlok New Issue
2015-04-01 13:17 renlok import_id => 438
2015-04-01 13:17 renlok Date Submitted 2015-04-01 13:17 => 2013-06-14 00:25
2015-04-01 13:17 renlok Last Update 2015-04-01 13:17 => 2013-06-14 00:25
2015-05-15 15:46 renlok Status new => resolved
2015-05-15 15:46 renlok Fixed in Version => 1.2.0
2015-05-15 15:46 renlok Resolution open => fixed
2015-05-15 15:46 renlok Assigned To => renlok


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker