Lot of good previous advice I won't repeat but never assume that the new hoses or any other part is good.

I had a similar problem with a bad caliper locking up so I replaced the caliper and old hose. Problem came back and the caliper checked out OK so I assumed the proportioning valve since the hose was new.

WRONG

The new hose was bad and made the same symptoms of a caliper locking up.

Bleed the brakes while they work fine.

Work the brakes until they seem to lock up. Bleed the brakes again. If it seems different in any way replace the hose or look for a pressure problem. If there is no residual pressure in the line and they seem to bleed OK then look to the mechanical problems.

Hope it helps