How to hide a form element when a datetime widget is filled using #states

The following code is working well to hide a button when a textfield is filled, but it is not working when a datetime widget is encoded:

$form('my_button') = (
  '#type' => 'container',
  'submit' => (
    '#type' => 'submit',
    '#value' => t("Click on me"),
    '#submit' => ('submit_me')),
    '#states' => (
      'visible' => (
        ':input(data-drupal-selector=selector-of-my-text-field)' => ( 
          'filled' => FALSE,
        ),
      ),
    ),
  ),
);

Any hint?