The story is based on the early German folk tale "All-Kinds-Of-Fur", collected by the Brothers Grimm, and on other variants of the same tale type in the Aarne-Thompson-Uther catalog of folklore: #510B "The Father Who Wanted to Marry His Daughter", classified as a "Cinderella" subvariant.
The Rule of Three - Youngest of three daughters, Sapsorrow commissions the making of three dresses to stall the arranged marriage with her father. She then wears those dresses on three different nights to woo the Prince.