title: Error: Invalid input: date_trans works with objects of class Date only date with $m-%d format
body: <p>i'm trying to plot a geom_ribbon with y = consumption and x = date with a format %m-%d. </p>
  
  <pre><code>df$date &lt;- as.Date((paste(df$annee, df$mois, df$jour, sep='-')), "%Y-%m-%d")
  df$monthday &lt;- as.Date(df$monthday, format = "%m-%d")
  g1 &lt;- ggplot(df) + 
        geom_ribbon(aes(ymin=min, ymax=max, x = monthday), data=df, group = 1) +
        geom_line(aes(y=mean, x=monthday), group = 1) + 
        scale_x_date(date_labels = "%m-%d", date_breaks = "1 month") 
  
  
  library(gridExtra)
  pdf("plot.pdf")
  grid.arrange(g1, ncol=1)
  dev.off()
  </code></pre>
  
  <p>But when I run the code, I get the below error :</p>
  
  <blockquote>
    <p>Error: Invalid input: date_trans works with objects of class Date only</p>
  </blockquote>
  
  <p>Thank you for your help! </p>