Skip to content

fix(carbon): fix initial value for date timepicker #1160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

rvsia
Copy link
Contributor

@rvsia rvsia commented Oct 26, 2021

Fixes #1155

Schema (if applicable)

const date = new Date();
date.setHours(18);
const date2 = new Date();
date2.setHours(1);

            schema={{
              fields: [
                { name: 'time-picker-1', component: componentTypes.TIME_PICKER, twelveHoursFormat: true, initialValue: date },
                { name: 'time-picker-2', component: componentTypes.TIME_PICKER, twelveHoursFormat: true, initialValue: date2 },
              ],
            }}

@rvsia rvsia added bug Something isn't working Carbon PRs/Issues for IBM's Carbon design system labels Oct 26, 2021
@DataDrivenFormsBot
Copy link

A new version (fix) will be released: v3.15.5 [DataDrivenFormsBot]

@codecov
Copy link

codecov bot commented Oct 26, 2021

Codecov Report

Merging #1160 (7b53431) into master (516c6dc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1160   +/-   ##
=======================================
  Coverage   94.89%   94.90%           
=======================================
  Files         209      209           
  Lines        3567     3571    +4     
  Branches     1234     1237    +3     
=======================================
+ Hits         3385     3389    +4     
  Misses        182      182           
Impacted Files Coverage Δ
...apper/src/time-picker-string/time-picker-string.js 100.00% <ø> (ø)
...nt-mapper/src/time-picker-base/time-picker-base.js 100.00% <100.00%> (ø)
...nt-mapper/src/time-picker-date/time-picker-date.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8018e0...7b53431. Read the comment docs.

@Hyperkid123 Hyperkid123 merged commit 06edb2d into data-driven-forms:master Oct 26, 2021
@GilbertCherrie
Copy link
Contributor

@Hyperkid123 Is there any chance this PR can be backported to version 2 of DDF. Only asking because we need this for older versions of ManageIQ currently using DDF version 2.

@rvsia
Copy link
Contributor Author

rvsia commented Jan 18, 2022

@GilbertCherrie can you please prepare a PR with both fixes? Against branch v2, I can release it tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Carbon PRs/Issues for IBM's Carbon design system released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Carbon Component Mapper Time Picker Initial Value Bug
4 participants