Let $E$ be a Hausdorff topological vector space and $f:\mathbb{R} \to E$ a function. Let us call $f$ differentiable at $x$ if $$ \lim_{h \to 0} \frac{f(x+h)-f(x)}{h} $$ exists (as a limit in $E$). If this limit exists, then $$ \lim_{h \to 0} \frac{e'(f(x+h))-e'(f(x))}{h} $$ exists for any $e' \in E'$, i.e. $e' \circ f$ is differentiable at $x$ in the usual sense.
Is the reverse true? Under which conditions?
My guess would be that if $E'$ separates points and $E$ is complete (or maybe only sequentially complete), then the existence of all these "scalar derivatives" would imply the existence of the derivative as $E$-valued function, but I'm not able to show this or find a reference.