Using dateRangeInput with BETWEEN logic in SQL

Man... my query is a default value of data. The others parameters have been tested and are correct:

WITHOUT the date, the tableoutput is there:

BUT, when i try to enter with DATE filter, it does not work.

I just tried the last code of the friend @jlacko, but it still not working even with many variation of syntax.

My UI.R code:

dateRangeInput("dates", 
                                  label = ("Periodo"),
                                  start = Sys.Date() - 90, end = Sys.Date() - 1,
                                  format = "dd/mm/yyyy",
                                  language = "pt-BR",
                                  separator = "ate"
                   )
menuItem( text = "Descricao do Material",
                               tabName = "descricao",
                               
                               numericInput(inputId= "diametro", label= "Diametro do Aco:", value= 0),
                               
                               numericInput(inputId= "parede", label= "Parede:", value= 0),
                               
                               textInput(inputId= "grau", label= "Grau:", value= 'x'),
                               
                               textInput(inputId= "aqa", label= "AQA:", value= 'x'),
                               
                               numericInput(inputId= "ciclo", label = "Ciclo:", value = 0),
                               
                               actionButton("plot", "Plotar!")

Server.R

 query <- glue(
      "select 
      cod_ordem_producao as Ordem,
      dim_ext_tubo as Diametro,
      esp_par_tubo as Parede,
      cod_aqa as AQA,
      tmo_ciclo_plan as Ciclo,
      dth_criacao_reg as Data,
      dsc_aco as Grau,
      val_lim_escoamento as LE,
      val_tensao_residual as TR
      from
      QT_QTS.PLA_ORDEM_PRODUCAO
      where DIM_EXT_TUBO = {as.numeric(input$diametro)}
      and esp_par_tubo = {as.numeric(input$parede)}
      and tmo_ciclo_plan = {as.numeric(input$ciclo)}
      and dth_criacao_reg between dates '{as.character(input$dates[1])}' and dates '{as.character(input$dates[2])}'
      and VAL_LIM_ESCOAMENTO != 0
      order by DTH_CRIACAO_REG desc")
    
    df <- dbGetQuery(
      connection_reportUser,
      query
    )