[
https://issues.apache.org/jira/browse/FLEX-13423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13678006#comment-13678006
]
Natallia edited comment on FLEX-13423 at 6/7/13 1:09 PM:
---------------------------------------------------------
The new problem appears after last fix. See steps in Description
Change step 3 to "Select the first day 11-December (only 1 day instead of
range)."
Actual Results: DateChooser selectedRanges.length = 0
Expected Results: DateChooser selectedRange.length = 1.
selectedRanges[0].rangeStart = selectedRanges[0].rangeEnd and should be
11-December.
Оne of the solutions: condition should be changed from "<" to "<=" in
removeRangeFromSelection method (line 2022):
...
for (var n:int = 0; n < selectedRangeCount; n++) {
rangeStart = _selectedRanges[n].rangeStart;
if (endDate < rangeStart)
continue;
rangeEnd = _selectedRanges[n].rangeEnd;
if (startDate <= rangeStart) {
if (endDate <= rangeEnd) { //here "<" is replaced with "<="
_selectedRanges[n].rangeStart = endDate;
....
was (Author: n.kireykova):
The new problem appears after last fix. See steps in Description
Change step 3 to "Select the first day 11-December (only 1 day instead of
range)."
Actual Results: DateChooser selectedRanges.length = 0
Expected Results: DateChooser selectedRange.length = 1.
selectedRanges[0].rangeStart = selectedRanges[0].rangeEnd and should be
11-December.
Condition should be changed from "<" to "<=" in removeRangeFromSelection method
(line 2022):
...
for (var n:int = 0; n < selectedRangeCount; n++) {
rangeStart = _selectedRanges[n].rangeStart;
if (endDate < rangeStart)
continue;
rangeEnd = _selectedRanges[n].rangeEnd;
if (startDate <= rangeStart) {
if (endDate <= rangeEnd) { //here "<" is replaced with "<="
_selectedRanges[n].rangeStart = endDate;
....
> DateChooser selectedRanges gives selectedRange start+1 day [if
> selectedRanges.rangeStart is same as selectableRange.rangeStart]
> -------------------------------------------------------------------------------------------------------------------------------
>
> Key: FLEX-13423
> URL: https://issues.apache.org/jira/browse/FLEX-13423
> Project: Apache Flex
> Issue Type: Bug
> Components: mx: DateChooser
> Affects Versions: Adobe Flex SDK Previous
> Environment: Affected OS(s): Windows
> Affected OS(s): Windows XP
> Language Found: English
> Reporter: Adobe JIRA
> Assignee: Justin Mclean
> Priority: Minor
> Labels: easyfix, easytest
> Fix For: Apache Flex 4.10.0
>
>
> Steps to reproduce:
> 1. Compile and run the below sample piece of code
> <?xml version="1.0" encoding="iso-8859-1"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
> <mx:DateChooser id="dc" selectableRange="{{rangeStart: new
> Date(2007,11,11), rangeEnd: new Date(2007,11,19)}}"
> allowMultipleSelection="true" />
> <mx:Button label="Selected Range" click="run()"/>
> <mx:Script>
> <![CDATA[
> public function run():void{
> for(var
> i:int=0;i<dc.selectedRanges.length;i++)
> {
>
> trace(dc.selectedRanges[i].rangeStart);
>
> trace(dc.selectedRanges[i].rangeEnd);
> }
> }
> ]]
> >
> </mx:Script>
> </mx:Application>
> 2. Notice that selectable range is in between 11-December to 19-December
> 3. Select all the dates
> 4. Click on the button 'Selected Range'. Notice that in the trace selected
> range start shows 12-December.
> Actual Results: DateChooser selectedRanges gives selectedRange start+1 day.
>
>
> Expected Results: selectedRange start date should be 11-December.
>
>
> Workaround (if any): none
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira