ManageIQ / ui-components

Angular UI Components for ManageIQ
Apache License 2.0
16 stars 52 forks source link

Corrected values for DialogFieldDateTimeControl #398

Closed romanblanco closed 5 years ago

romanblanco commented 5 years ago

result of discussion in #392:

https://github.com/ManageIQ/ui-components/pull/392#discussion_r296871830 https://github.com/ManageIQ/ui-components/pull/392#discussion_r298549039

romanblanco commented 5 years ago

I've been using this Automate method (for a dialog with one checkbox and a date-time field) to verify the value get updated correctly for automate requests:

trigger = $evm.root['dialog_trigger']

$evm.log('info', "======= trigger value #{trigger}")
if trigger == "t"
  new_date = Time.utc(2019, 12, 24)
  #new_date = '2019-12-24'
  $evm.object['value'] = new_date
  $evm.log('info', "======== new date #{$evm.object['value']}")
else # "f"
  $evm.object['value'] = Time.utc(2021, 12, 24)
  $evm.log('info', "======== clearing up date #{$evm.object['value']}")
end
romanblanco commented 5 years ago

@eclarizio please review

miq-bot commented 5 years ago

Checked commit https://github.com/romanblanco/ui-components/commit/bd20eb47807bc52a4f5c56b81d107a09a889c559 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 0 files checked, 0 offenses detected Everything looks fine. :star:

himdel commented 5 years ago

Added the change (and spec fix) as part of https://github.com/ManageIQ/ui-components/pull/399

miq-bot commented 5 years ago

This pull request is not mergeable. Please rebase and repush.